Perl is a high-level, general-purpose, interpreted, dynamic programming language.
0
votes
0answers
5 views
How can I call a C++ dll in perl without using com?
I am looking for examples to call a C++ dll in a perl code without using COM. Can I use win32::API? The library is written in visual studio 2010.
0
votes
1answer
11 views
how to remove the special characters which is getting appended while reading sql file from perl
I'm trying to execute queries from sql file using perl, but when I tried, I see some special char is getting appended in between or at the end of the query. I'm not sure how to resolve this.
my $dbh ...
0
votes
1answer
30 views
Mixing Java with interpreted languages Inline::Java vs. Jython vs. Jruby
I'd like to know how Perl, Python, and different their approach to integrating with Java.
I have experience combining Perl and Java through the Inline::Java module. But no experience with Python's ...
0
votes
1answer
16 views
Perl Regex Pattern Issues
I am new to perl and need to know a pattern to help me check the following:-
$string="test1\n // test2 \n test3 ";
I want a pattern to check that test2 is not commented. I read about positive ...
0
votes
0answers
23 views
How do I find the line number of a certain phrase in perl?
I am using a while loop to assign real numbers from an input file to an array. The input file is set up in a way that makes the first 21 points in the array blank. The number 21 corresponds to the ...
0
votes
1answer
20 views
mkdir not working over ssh
I am developing a script to go to a server and copy files within the server with perl over ssh.I log in into the remote server and than execute:
*my ($stdout,$stderr,$exit) = $ssh->cmd("mkdir ...
0
votes
2answers
30 views
Shell Programming inside Perl
I am writing a code in perl with embedded shell script in it:
#!/usr/bin/perl
use strict;
use warnings;
our sub main {
my $n;
my $n2=0;
$n=chdir("/home/directory/");
if($n){
...
0
votes
0answers
20 views
Saving HTML with Checkbox states
I am writing a Perl script that is parsing a file into an HTML table which essentially contains classes and their information. The main objective of the script is for the user to check which classes ...
1
vote
1answer
24 views
Needing to send a JSON request in perl
I am having trouble making this work I keep getting a 400 bad request response. Any help is greatly appreciated as this is my first attempt at both coding perl and using JSON. I had to remove some of ...
10
votes
2answers
55 views
Explain this perl code which displays common lines in 2 files
How does this perl one-liner display lines that 2 files have in common?
perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' file1 file2
0
votes
0answers
25 views
Perl Net::Nslookup Module not working?
What I thought would be a pretty basic module to use isn't making sense to me...
Here's my very basic script that isn't returning anything:
#!usr/bin/perl
use strict;
use warnings;
use ...
1
vote
1answer
26 views
script does not fetch properly
#!/usr/bin/perl
if (! eval "require LWP::UserAgent;")
{
$ret = "LWP::UserAgent not found";
}
if ( exists $ARGV[0]) {
if ($ret)
{
print "no ($ret)\n";
...
1
vote
2answers
21 views
Run a deamon loop without eating all the CPU (Perl)
I have the following code:
use Proc::Daemon;
Proc::Daemon::Init;
my $continue = 1;
$SIG{TERM} = sub { $continue = 0 };
while ($continue) {
##DO THINGS
}
I noticed that this script is using ...
1
vote
6answers
40 views
remove an array from AOA perl
I have an array of array that looks like this -
$VAR1 = [
'sid_R.ba',
'PS20TGB2YM13',
'SID_r.BA',
'ARS',
'XBUE'
]; $VAR2 = [
...
2
votes
1answer
29 views
I want XML::Twig to print exactly what was parsed in
I have XML that contains ' for ', etc. When I parse it in using XML::Twig and then print it out again, all the ' are printed as '. Also, XML::Twig seems to reorder attributes to ...