When I asked this previously I should have mentioned that it's particularly a light-weight IDE that I'm after, so I’m having to ask again as a different question.
Something that is not just a text editor, is light-weight and versatile, that would suit Strawberry Perl, the GCC that comes with MinGW, GDB and Subversion. Something that whe...
I don't want to use the HTTP::Proxy package because I want to dump out a couple requests. My one liner looks like this, but breaks on trying to pass the header in:
perl -MData::Dumper -MHTTP::Daemon -MHTTP::Status -MLWP::UserAgent -e 'my $ua = LWP::UserAgent->new;my $d=new HTTP::Daemon(LocalPort=>1999);print "Please contact me at: <", $...
I have a Perl module that I would like to use from Java. Is there a way to call this code using either ActiveState Perl on Windows or the generic Perl that comes with Linux? I have found references to JPL but it doesn’t appear to be maintained anymore.
...
What is the best way to call C/C++ from other languages such as Java, Python, Perl, PHP, etc?
...
I wish to convert a single string with multiple delimiters into a key=>value hash structure. Is there a simple way to accomplish this? My current implementation is:
sub readConfigFile() {
my %CONFIG;
my $index = 0;
open(CON_FILE, "config");
my @lines = <CON_FILE>;
close(CON_FILE);
my @array = split(/>/, $lines[0]);
my $total = @...
Is there any way to trap an error and exit gracefully from Perl? I am working on a script which might fail due to a SIG event from the OS or other applications running on my server. I wish to trap this event, display the error and exit after closing all files and other attributes I have open during the execution of the script.
...
What is the best way to find the total number of words in a text file in Java? I'm thinking Perl is the best on finding things such as this. If this is true then calling a Perl function from within Java would be the best? What would you have done in condition such as this? Any better ideas?
...
I have a little Perl script (On Windows) that checks some files for me as an aid to my day-to-day business. At the moment it prints out something like...
0%
25%
50%
75%
Complete
But I can remember scripts I've used in the past that didn't print progress on a line-by-line basis, but which updated the output on the display, presumably b...
In Python, if I do this:
print "4" * 4
I get
> "4444"
In Perl, I'd get
> 16
Is there an easy way to do the former in Perl?
...
What is a good way to create and read an OpenOffice spreadsheet in Perl?
...
If I have a comma separated file like the following:
foo,bar,n
,a,bc,d
one,two,three
,a,bc,d
And I want to join the \n, to produce this:
foo,bar,n,a,bc,d
one,two,three,a,bc,d
What is the regex trick? I thought that an if (/\n,/) would catch this.
Also, will I need to do anything special for a UTF-8 encoded file?
Finally, a sol...
How can I send email using Perl through my Gmail account? The one CPAN library (Mail::Webmail::Gmail) that I tried didn't work and I don't see much activity with it.
At the moment I really only need to send a message. However, the advanced functionality of getting my contacts, acting when a new email is received that has a certain lab...
I'm going into network engineering and security and I will eventually need to learn a bit of Perl.
In year 3 of my course, 2 years away.
So I was interested in starting a bit early, I've got the camel beside me and before indulging into this, I wanted some people to help win me over and make me want to learn Perl. What's good about it...
Hello,
My boss has decided to use Perl as our (preferably) single, main development language.
For me, it just doesn't seem right. I'm asking on your opinion about it, as my feelings might be influenced by today's trends and the horrible syntax (coming from c/java background).
For me, specifically, after Java, I was shocked about the la...
create table person
(
name varchar(15),
attr1 varchar(15),
attr2 varchar(1),
attr3 char(1),
attr4 int
)
How I can use basic ORM in Perl by taking a simple table like the one above and mapping it to Perl objects? Next I'd like to perform basic operations like select results using some criteria system Perl like synt...
This recent question on doing ORM in Perl proved somewhat timely, as I was just looking at Perl ORMs yesterday. Unfortunately, I was not particularly satisfied with what I found:
They all appear (at least in their documentation) to focus primarily on the relational side of the object-relational divide. "Use our ORM to provide an OO(is...
Hello,
In PHP, I can write:
$vname = 'phone';
$$vname = '555-1234';
print $phone;
... And the script will output "555-1234".
Is there any equivalent in Perl?
Edit: Thanks, CMS.
Is there any way to constrain $phone to the scope of the local block, as if I'd written "my $phone"? Using "my $$vname" gives me "Can't declare scalar dere...
I have a website cgi-bin program that is written in c++.
Unfortunately the website provider for my friend's site only allows Perl or PHP cgi-bin scripts.
Is there an easy way to simply have a very small Perl or PHP wrapper that just calls the c++ compiled binary?
Would the c++ program still be able to read from stdin for POST comman...
I'm having trouble trying to install DBD::Sybase on Redhat. Perl version is 5.8.8 and it is the 64-bit version. When I set the SYBASE env variable to the freetds libs in /usr (the rpm puts libtds in /usr/lib64), it gives the following error message
$ perl ./Makefile.PL
Can't find any Sybase libraries in /usr/lib at ./Makefile.PL line ...
I'm trying to insert a comment character into a string something similar to this:
-CreateVideoTracker VT1 "vt name"
becomes
-CreateVideoTracker VT1 # "vt name"
The VT1 word can actually be anything, so I'm using the regex
$line =~ s/\-CreateVideoTracker \w/\-CreateVideoTracker \w # /g;
which gives me the result:
-CreateVideoTra...