Re: Perl's superior text parsing power

2009-09-02 Thread Jeff Pang
?? "Shawn H. Corey" ? Dave Tang wrote: I wanted to ask why is Perl, in comparison to other programming languages, so powerful in text processing? Undoubtedly, when it was written, Perl was the most powerful text processing language available. This is no longer the case (thanks largely t

Re: Perl's superior text parsing power

2009-09-02 Thread Shlomi Fish
On Thursday 03 September 2009 06:44:40 Uri Guttman wrote: > > "SHC" == Shawn H Corey writes: > > SHC> Dave Tang wrote: > >> I wanted to ask why is Perl, in comparison to other programming > >> languages, so powerful in text processing? > > SHC> Undoubtedly, when it was written, Perl

Re: Perl's superior text parsing power

2009-09-02 Thread Chas. Owens
On Wed, Sep 2, 2009 at 23:20, Shawn H. Corey wrote: > Dave Tang wrote: >> >> I wanted to ask why is Perl, in comparison to other programming languages, >> so powerful in text processing? > > Undoubtedly, when it was written, Perl was the most powerful text processing > language available.  This is

Re: Search single scalar variable for Multiple matches

2009-09-02 Thread Uri Guttman
> "NGW" == Noah Garrett Wallach writes: NGW> what is the cleanest way to search a multi-line single scalar variable NGW> full of configuration information. I want match on specific criteria NGW> and then save a portion of the matched information in a hash or hashes NGW> variable.

Re: Perl's superior text parsing power

2009-09-02 Thread Chas. Owens
On Wed, Sep 2, 2009 at 21:39, Dave Tang wrote: > Hi everybody, > > I constantly read about Perl's powerful regular expression matching and > string manipulation operators, and how it is superior to other programming > languages in this aspect. snip * Regexes are first class citizens in Perl, in o

Search single scalar variable for Multiple matches

2009-09-02 Thread Noah Garrett Wallach
Hi there, what is the cleanest way to search a multi-line single scalar variable full of configuration information. I want match on specific criteria and then save a portion of the matched information in a hash or hashes variable. What is the best approach to doing this? Cheers, Noah --

Re: search replace saved to a variable

2009-09-02 Thread Uri Guttman
> "NGW" == Noah Garrett Wallach writes: NGW> Jim Gibson wrote: >> At 7:22 PM -0700 9/2/09, Noah Garrett Wallach wrote: >>> Hi there, >>> >>> what is the way to collapse this search/replace to one line? >>> >>> my $filename_cmd = $cmd[-1]; >>> my $filename_cmd =~ s/\s/\./;

Re: search replace saved to a variable

2009-09-02 Thread Noah Garrett Wallach
Jim Gibson wrote: At 7:22 PM -0700 9/2/09, Noah Garrett Wallach wrote: Hi there, what is the way to collapse this search/replace to one line? my $filename_cmd = $cmd[-1]; my $filename_cmd =~ s/\s/\./; (my $filename_cmd = $cmd[-1]) =~ s/\s/\./; thanks, okay a step further -

Re: Perl's superior text parsing power

2009-09-02 Thread Uri Guttman
> "SHC" == Shawn H Corey writes: SHC> Dave Tang wrote: >> I wanted to ask why is Perl, in comparison to other programming >> languages, so powerful in text processing? SHC> Undoubtedly, when it was written, Perl was the most powerful text SHC> processing language available. This i

Re: Perl's superior text parsing power

2009-09-02 Thread Dave Tang
On Thu, 03 Sep 2009 13:18:44 +1000, Uri Guttman wrote: "TB" == Tim Bowden writes: TB> On Thu, 2009-09-03 at 11:39 +1000, Dave Tang wrote: >> I wanted to ask why is Perl, in comparison to other programming >> languages, so powerful in text processing? I read >> http://en.wikipedia.

Re: Perl's superior text parsing power

2009-09-02 Thread Shawn H. Corey
Dave Tang wrote: I wanted to ask why is Perl, in comparison to other programming languages, so powerful in text processing? Undoubtedly, when it was written, Perl was the most powerful text processing language available. This is no longer the case (thanks largely to Perl :). Today's scripti

Re: Perl's superior text parsing power

2009-09-02 Thread Uri Guttman
> "TB" == Tim Bowden writes: TB> On Thu, 2009-09-03 at 11:39 +1000, Dave Tang wrote: >> I wanted to ask why is Perl, in comparison to other programming >> languages, so powerful in text processing? I read >> http://en.wikipedia.org/wiki/Perl#Features, and that doesn't really >> exp

Re: Perl's superior text parsing power

2009-09-02 Thread Tim Bowden
On Thu, 2009-09-03 at 11:39 +1000, Dave Tang wrote: > Hi everybody, > > I constantly read about Perl's powerful regular expression matching and > string manipulation operators, and how it is superior to other programming > languages in this aspect. > > Furthermore, I read this in the wikipedi

Re: search replace saved to a variable

2009-09-02 Thread Jim Gibson
At 7:22 PM -0700 9/2/09, Noah Garrett Wallach wrote: Hi there, what is the way to collapse this search/replace to one line? my $filename_cmd = $cmd[-1]; my $filename_cmd =~ s/\s/\./; (my $filename_cmd = $cmd[-1]) =~ s/\s/\./; -- Jim Gibson jimsgib...@gmail.com -- To unsubscribe

search replace saved to a variable

2009-09-02 Thread Noah Garrett Wallach
Hi there, what is the way to collapse this search/replace to one line? my $filename_cmd = $cmd[-1]; my $filename_cmd =~ s/\s/\./; Cheers, Noah -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Perl's superior text parsing power

2009-09-02 Thread Dave Tang
Hi everybody, I constantly read about Perl's powerful regular expression matching and string manipulation operators, and how it is superior to other programming languages in this aspect. Furthermore, I read this in the wikipedia entry of Perl: "The language provides powerful text processin

Re: accessing chars in a string

2009-09-02 Thread Chas. Owens
On Wed, Sep 2, 2009 at 11:49, Telemachus wrote: > On Tue Sep 01 2009 @ 10:44, Steve Bertrand wrote: >> A good place to reference regex is [1]. >> >> [1]: http://perldoc.perl.org/perlretut.html > > I will throw in my two cents and mention that if you are starting regular > expressions, you may find

Re: accessing chars in a string

2009-09-02 Thread Telemachus
On Tue Sep 01 2009 @ 10:44, Steve Bertrand wrote: > A good place to reference regex is [1]. > > [1]: http://perldoc.perl.org/perlretut.html I will throw in my two cents and mention that if you are starting regular expressions, you may find perldoc perlrequick a little more gentle, as an introduct