FAQ 4.56 How do I merge two hashes? This is an excerpt from the latest version perlfaq4.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . --------... 22 Jan 2010 18:34
help with perl search/replace regex So i have a file with a line foo_bar_baz (some amount of whitespace) 100 (a number) I basically want to have a search regex that searches foo_bar_baz(and then to the end of the line regardless of what text) and replace it with foo_bar_baz \t (tab) 101 (some dif number --- my command is as such but isnt ... 22 Jan 2010 18:34
How to dissect a Regexp object? Is there a way to tell if a given Regexp object, generated at runtime, includes at least one pair of capture parentheses? More generally, is there any documentation for the Regexp class? (I'm referring to the class alluded to by the output of, e.g., ref qr//). Running perldoc Regexp fails ("no docs found")... 24 Jan 2010 11:18
Leanest way to get at keyboard events ? In a small command-line app, e.g. running in an xterm or a linux console, I need to get at the keydown and keyup events. ( I realise this is impossible with a vt100 over a serial line, and hence presumably with /dev/tty. ) I don't really want to have to use a whole GUI infrastructure and do something like st... 26 Jan 2010 01:07
Modules for PDFs especially tables. I want to produce a PDF containing two tables side by side. Each 51 rows (including a header) by three columns. Columns 1 and 2 in each table are to contain centred text, and column three is to be left-aligned. I've been experimenting with PDF::API2, and PDF::Table, but PDF::Table doesn't appear to do centred t... 2 Feb 2010 14:57
BEGIN and lexicals I have a large list of my vars that I would like to get out of the way; place them at the end of the script - kinda a class thing. Is there a way to use BEGIN some how? Something like this. I suspect you can't, but I'm asking the pros. use strict; code using $var1 ... code using $var1 ... more code B... 8 Feb 2010 07:46
FAQ 7.21 How do I redefine a builtin function, operator, or method? This is an excerpt from the latest version perlfaq7.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . --------... 19 Jan 2010 12:22
FAQ 7.9 How do I create a module? This is an excerpt from the latest version perlfaq7.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . --------... 19 Jan 2010 00:19
Variable set to 0 I have the following: use strict; use warnings; my $number=0; print "This:$number\n"; print "That:$number\n" if $number; __END__ Of the two lines that print the variable, why does it print the first line but not the second? If I change the $number to equal 1, then both lines print fine. thank you ... 20 Jan 2010 17:25
FAQ 6.12 Can I use Perl regular expressions to match balanced text? This is an excerpt from the latest version perlfaq6.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . --------... 18 Jan 2010 06:24 |