regexp question

2009-09-04 Thread Noah Garrett Wallach
Hi there, is there any way to search for the following text? In some cases the text that I am search could be one-two-three- or sometimes the text could be one-two- what is a nice easy why to parse the above - quotes not included. -- To unsubscribe, e-mail:

Re: source code for builtin functions

2009-09-04 Thread Peter Scott
On Thu, 27 Aug 2009 13:04:39 -0700, heyi xiao wrote: My linux system has a pre-installed perl. Is there a good way to check the source code for builtin functions, like reverse etc. I want to check the source code for better learning/understanding. http://github.com/github/perl/tree/blead

Re: regexp question

2009-09-04 Thread Chas. Owens
On Fri, Sep 4, 2009 at 04:08, Noah Garrett Wallachnoah-l...@enabled.com wrote: Hi there, is there any way to search for the following text?  In some cases the text that I am search could be one-two-three- or sometimes the text could be one-two- what is a nice easy why to parse the

Re: regexp question

2009-09-04 Thread Erez Schatz
2009/9/4 Noah Garrett Wallach noah-l...@enabled.com: is there any way to search for the following text?  In some cases the text that I am search could be one-two-three- or sometimes the text could be one-two- If you're looking for this specific text then a good answer was already given, but

hash of hashes question

2009-09-04 Thread Noah Garrett Wallach
Hi there, I am having some trouble understanding hash of hashes here. I want to find all the keys for %policy{'policy_statement'} for my $line (@lines) { for my $key ( keys %policy{'policy_statement'} ) { if ($line =~

Re: hash of hashes question

2009-09-04 Thread Jim Gibson
At 11:02 AM -0700 9/4/09, Noah Garrett Wallach wrote: Hi there, I am having some trouble understanding hash of hashes here. I want to find all the keys for %policy{'policy_statement'} for my $line (@lines) { for my $key ( keys %policy{'policy_statement'} ) { %policy is a

Re: hash of hashes question

2009-09-04 Thread Patrick Dupre
On Fri, 4 Sep 2009, Noah Garrett Wallach wrote: Hi there, I am having some trouble understanding hash of hashes here. I want to find all the keys for %policy{'policy_statement'} for my $line (@lines) { for my $key ( keys %policy{'policy_statement'} ) { Check if $keys is

Re: hash of hashes question

2009-09-04 Thread Noah Garrett Wallach
Patrick Dupre wrote: On Fri, 4 Sep 2009, Noah Garrett Wallach wrote: Hi there, I am having some trouble understanding hash of hashes here. I want to find all the keys for %policy{'policy_statement'} for my $line (@lines) { for my $key ( keys %policy{'policy_statement'} ) {

execute in another terminal

2009-09-04 Thread Bryan R Harris
Not exactly a perl question, but I'd certainly like to use this with perl... Is it possible from one terminal window in linux (RH) to tell another terminal to execute a shell command, e.g. perl script, just as if you typed it there? - Bryan -- To unsubscribe, e-mail:

hash of hashes values and keys

2009-09-04 Thread Noah Garrett Wallach
Hi there, I am trying to figure out how to use hash of hashes properly. can values and keys be at the same level? I am running in to troubles. Maybe values and keys cant be at the same level ? $policy{policy_statement}{$key} = 2;

Re: hash of hashes values and keys

2009-09-04 Thread Uri Guttman
NGW == Noah Garrett Wallach noah-l...@enabled.com writes: NGW I am trying to figure out how to use hash of hashes properly. can NGW values and keys be at the same level? no. any level can have one key of a given string, that is how hashes are defined. if you need more than one thing, you

Re: hash of hashes values and keys

2009-09-04 Thread Jim Gibson
At 1:56 PM -0700 9/4/09, Noah Garrett Wallach wrote: Hi there, I am trying to figure out how to use hash of hashes properly. can values and keys be at the same level? I am running in to troubles. Maybe values and keys cant be at the same level ? Values and keys exist as pairs within a

perldoc modules

2009-09-04 Thread Noah Garrett Wallach
Hi there, this might be obvious but how can I find a list of all the perldoc modules? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: perldoc modules

2009-09-04 Thread Jim Gibson
At 7:34 PM -0700 9/4/09, Noah Garrett Wallach wrote: Hi there, this might be obvious but how can I find a list of all the perldoc modules? Perldoc will only work for modules that are installed on your system. The directories in which Perl will search for modules is given by the array @INC.

Re: execute in another terminal

2009-09-04 Thread Jeff Pang
?? Bryan R Harris bryan_r_har...@raytheon.com? Not exactly a perl question, but I'd certainly like to use this with perl... Is it possible from one terminal window in linux (RH) to tell another terminal to execute a shell command, e.g. perl script, just as if you typed it there? Is it the

Re: perldoc modules

2009-09-04 Thread Jeff Pang
2009/9/5 Noah Garrett Wallach noah-l...@enabled.com: Hi there, this might be obvious but how can I find a list of all the perldoc modules? All standard modules including core and non-core modules have perldoc interface. For checking core modules:

perldoc output looks strange

2009-09-04 Thread Noah Garrett Wallach
Hi there, does anybody know why the perldoc output looks so strange on my mac? Here are the first few lines of 'perldoc perldoc' SYNOPSIS perldoc [###7m8892^H###7m8892h] [###7m8892^H###7m8892v] [###7m8892^H###7m88 92t] [###7m8892^H###7m8892u] [###7m8892^H###7m8892m]

regexp question

2009-09-04 Thread Noah Garrett Wallach
Okay I am having troubles finding this. in the perldoc modules. Is there a slicker way to write the following? if ($line =~ /(Blah1)(.*)/) { $blah = $1 if $1; $blah2 = $2 if $2; } -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Re: regexp question

2009-09-04 Thread Chas. Owens
On Fri, Sep 4, 2009 at 23:06, Noah Garrett Wallachnoah-l...@enabled.com wrote: Okay I am having troubles finding this. in the perldoc modules. Is there a slicker way to write the following?        if ($line =~ /(Blah1)(.*)/) {             $blah = $1 if $1;             $blah2 = $2 if $2;