RE: [PBML] Setting special variable $/ to a regular expression

2004-08-26 Thread Madani, Srikanth, VF-DE
Our fellow list member Denham wrote: >Is there some way to set the special variable $/ to a regular expression >such as (.+?):(\d+):(.*) Well, man perlvar says: perlvar> Remember: the value of $/ is a string, not a regexp. perlvar> AWK has to be better for something :-) >I am trying to process

Re: Setting special variable $/ to a regular expression

2004-08-26 Thread Paul Johnson
On Thu, Aug 26, 2004 at 12:35:25PM +0200, Denham Eva wrote: > Is there some way to set the special variable $/ to a regular expression > such as (.+?):(\d+):(.*) >From perlvar: Remember: the value of "$/" is a string, not a regex. awk has to be better for something. :-) I await the reply

Setting special variable $/ to a regular expression

2004-08-26 Thread Denham Eva
Hello Perl Gurus, Is there some way to set the special variable $/ to a regular expression such as (.+?):(\d+):(.*) I have tried: local $/ =~ m/(.+?):(\d+):(.*)/; # But cannot change $/; local $/= /(.+?):(\d+):(.*)/; # Use of uninitialized value in pattern match m//. I am trying to p