|
I want to use Apple's or RedHat's built-in Apache but I want to use Perl 5.10 and mod_perl. What's the least intrusive way to accomplish this? I want the advantage of free security patching for the vendor's Apache, dav, php, etc., but I care a lot about...
Started by Chris Dolan on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I mostly started with this because I didn't want the... .
This was pretty straight forward.
I started with making my own perl RPM that installed perl into a different location, like /opt/ .
Since vendor perl's are usually 2-3 years old.
|
|
I have been using the Perl command line with a -ne option for years, largely to process text files in ways that sed can't. Example:
cat in.txt | perl -ne "s/abc/def/; s/fgh/hij/; print;" > out.txt
I have no idea where I learned this, and have only ...
Started by Anon Guy on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
perl -ne 'CODE' is equivalent to the program
while (<>) { CODE }
perl -ane 'CODE' and perl -F :
perl -ne 'print if/REGEX1/&&!/REGEX2/&&(/REGEX3/||/REGEX4/&&!/REGEX5/)' input perl -F/,/ -ane that uses mismatched....
|
|
I have a plain perl script that can be run from the command-line via perl -w test.pl . I then have a mod_perl2 script that can be accessed from a web browser. I want to have the latter call the former and send the output to the browser, flushing as it...
Started by Kev on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
You need to find where Perl binary lives (on Unix, do which perl , on Windows, find Perl icond and find command line path or find the directory where perl is installed - for....
This is to put a "1;" at the end of your script .
|
Ask your Facebook Friends
|
I've got a Perl script that needs to execute another Perl script. This second script can be executed directly on the command line, but I need to execute it from within my first program. I'll need to pass it a few parameters that would normally be passed...
Started by cbowns on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
#!/usr/bin/perl use strict; open(OUTPUT, "date|") or die "Failed to create = `perl somePerlScript.pl `; system() call eval The eval can be accomplished by slurping the other file into a string (or a list of strings....
Easiest and most likely.
|
|
Has anybody found a good solution for lazily-evaluated lists in Perl? I've tried a number of ways to turn something like
for my $item ( map { ... } @list ) { }
into a lazy evaluation--by tie-ing @list, for example. I'm trying to avoid breaking down and...
Started by Axeman on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
However do be warned to the thread results to make the Perl....
Use an iterator or consider using Tie::LazyList from CPAN excellent book Higher Order Perl can walk you through those techniques.
A tie is as close as you can get in Perl 5.
|
|
On Thu, 08 Oct 2009 23:00:06 +0200, Jari Aalto <jari.aalto@cante.net
Package: libio-capture-perl
Severity: minor
Current description: libio-capture-perl - Abstract Base Class to build modules to capture output
Please improve debian/control...
Started by Jari Aalto on
, 5 posts
by 3 people.
Answer Snippets (Read the full thread at omgili):
Ideas?
(Please note that "^Perl module" is often a fallback when there's no
better solution.)
Cheers;gregoa@debian.org
Howabout:
....
That I can't come up with a meaningful noun
phrase that starts with "Perl module" in this case.
|
|
Which is the way that I can reclaim memory back from my Perl script and/or to prevent perl from memory management pooling?
Started by Varun on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
As answered on a parallel question ....
The most effective method is to have plenty of virtual memory, so that memory that perl has to keep perl from just allocating more memory over time...not because it is leaked, but because perl.
|
|
I am a perl newbie,
Can I simply use 64-bit arithmetic in Perl?
For example
$operand1 = 0x ; // 48 bit value $operand2 = 0x ; // 48 bit value $Result = $operand1 * $operand2;
I am basically looking for a replacement for the int64_t in perl. Is there any...
Started by Alphaneo on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
See bigint ..
Yes, however you need to have Perl compiled with 64-bit support.
However, Perl does not offer formats supported by Perl.
Yes, Perl automatically handles large integer arithmetic for you.
|
|
I am going to spend 30 minutes teaching Perl to an experienced programmer. The best way to learn Perl is by writing code. In addition to CPAN, what would you show a programmer so they would understand the expressiveness of Perl, the amount of functionality...
Started by melling on
, 11 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
Pick out Smart Comments , POD , closures , the ... .
Perl usually has some way to make just about any task super-quick.
That's basically a task and that should wow them.
Definitely show them how easy it is to use regular expressions in Perl.
|
|
Is there a reason why opendir doesn't have the same policy than open in Perl Best Practices ?
I'm thinking about at least these 2 policies:
Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles Perl::Critic::Policy::InputOutput::RequireBriefOpen...
Started by sebthebert on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Perl::Critic is based in ....
To the source is the easiest way to learn why
The original rule from Perl Best Practices (for the first Policy you mention) was
Don't use bareword filehandles
which applies to much more than just open .
|