Re: Learning Perl chpt.13 problem

2001-06-19 Thread Randal L. Schwartz
> "You" == <[EMAIL PROTECTED]> writes: You> I don't understand the regex s#.*/##s You> (given as part of the solution to problems 2 and 3) You> more specifically, I don't know what the last 's' does You> to the regex. As others have said, the trailing "s" allows newline to be matched: oth

Re: Learning Perl chpt.13 problem

2001-06-19 Thread Nigel Wetters
>From perldoc perlre: s Treat string as single line. That is, change "." to match any character whatsoever, even a newline, which normally it would not match. >>> <[EMAIL PROTECTED]> 06/19/01 01:40pm >>> I don't understand the regex s#.*/##s (given as part of the

Re: Learning Perl chpt.13 problem

2001-06-19 Thread n6tadam
Hi, s/#.*/## The above is used either to indicate a substitution of a string. The "s" indicates substitute. The rule is, that whatever you specifiy after the "s", is the regex that you are looking for (this in the above case "#.*"). This is then separated by a "/". Anything after is the replace

Re: Learning Perl chpt.13 problem

2001-06-19 Thread Brett W. McCoy
On Tue, 19 Jun 2001 [EMAIL PROTECTED] wrote: > I don't understand the regex s#.*/##s > > (given as part of the solution to problems 2 and 3) > > more specifically, I don't know what the last 's' does > to the regex. It lets . match a newline (\n). It also will make the match ignore $* -- which

Learning Perl chpt.13 problem

2001-06-19 Thread patroclus_1
I don't understand the regex s#.*/##s (given as part of the solution to problems 2 and 3) more specifically, I don't know what the last 's' does to the regex. __ Do You Yahoo!? Spot the hottest trends in music, movies, and more. http://buzz.yahoo.