|
Are there any other ways for debugging Perl apart from Data::Dumper and perl -d ?
Started by joe on
, 17 posts
by 17 people.
Answer Snippets (Read the full thread at stackoverflow):
Source code is not available....
perl -d yourcode.pl
Devel::ptkdb
Perl/Tk based graphical in Lisp .
Built-in command line debugger.
Available tools for debugging
There are several tools available in Perl for debugging and similar tasks.
|
|
I.e.:
echo H#97llo | MagicPerlCommand
Stdout:
Hallo
were MagicPerlCommand is something like
perl -pnle "s/#(\d+)/chr(\1)/ge"
(but that doesn't work).
Started by secr on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Since it's Perl, you've got to use Perl's syntax for the bracket reference.
To the regex means the right hand half is just another normal Perl expression, and not a regex substitution.
|
|
Inspired by the original thread and the up and coming clones, here's one for the Perl community.
What are questions a good Perl programmer should be able to respond to?
Started by Mark Canlas on
, 18 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Perl implement object orientation? How does Perl's object orientation differ from other languages like C# and Java? Traditional object orientation in core Perl has largely been superseded by what? Why of Perl's greatest strengths....
|
Ask your Facebook Friends
|
What are the popular, contemporary uses for Perl?
Edit
I should have been more specific. I was wondering more on the large scale (popular) what people are using Perl for rather than what it could be used for on the individual level.
Started by T. Stone on
, 15 posts
by 15 people.
Answer Snippets (Read the full thread at stackoverflow):
See skills that are being sought by employers....
Heck, the whole of cpan is a testament to Perl's reusability and encapsulation.
The problem with this question, is that Perl is a very.
And if they can do it in five lines, all the better .
|
|
How can I elegantly print the date in RFC822 format in Perl?
Started by Tom Feiner on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
"\n()->strftime("%a, %d %b %Y %H:%M:%S %z"); use DateTime::Format::Mail; print DateTime::Format::Mail->.
Use POSIX qw(strftime); print strftime("%a, %d %b %Y %H:%M:%S %z", localtime(time())) .
|
|
I know of python -c '<code>' , but I'm wondering if there's a more elegant python equivalent to perl -pi -e '<code>' . I still use it quite a bit for things like find and replace in a whole directory ( perl -pi -e s/foo/bar/g * or even find...
Started by Silfheed on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
If magic you want, Perl you should use!
The command line usage concept, thereby making Python equivalents....
Perl tends to make extensive usePython is for muggles.
From ' python -h ' certainly strongly suggests there is no such equivalent.
|
|
If I have a Perl string:
$str = "Hello";
how can I get a character at a given index similar to charAt(index)?
Started by Gdeglin on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
String, 2, 2, "same thing basically"); @a = qw(s t r i n g s a n d t h i n g s); @cut_out = splice.
|
|
This is a simple script I have written to test command line argument handling:
use Getopt::Long; my $help = 0; GetOptions( 'help|h|?' => \$help, ) or die "Error!"; print "OK\n";
The results I got are as follows:
D:\>perl test.pl --help OK D:\>...
Started by Andy on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Options may be abbreviated....
This is a feature.
It accepts the shortest non-ambiguious version of the option, so if you had another option "--hex", it wouldn't accept "--he" but it would accept "--hel" .
It is a feature documented here
No, it's intentional.
|
|
Hi, I know how to use sed with grep , but within Perl the below fails. How can one get sed to work within a Perl program?
chomp (my @lineNumbers=`grep -n "textToFind" $fileToProcess | sed -n 's/^\([0-9]*\)[:].*/\1/p'`)
Started by Alex Wong on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Anything you need to do with grep or sed can be done natively in perl more/ ? $_[1] : () } $fileToProcess;
Supposedly Larry Wall wrote....
Suggestion: Use Perl regular expressions and replacements instead of grep or sed the extra sed process.
|
|
Where can I find some simple W3C Validator API info for Perl? I've tried looking and just keeps leading to page after page of documentation.
Simply looking for download module or whatever is needed (I am new to Perl but I want to use it for this project...
Started by Phil Jackson on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
On Windows, I'd use Strawberry Perl the platform specific package installer....
On UNIX based systems I would follow the bootstrap instructions for local::lib and then install with cpan WebService::Validator::HTML::W3C .
Install of Perl from.
|