Re: multilinepattern match
From: Anno Siegel (anno4000_at_lublin.zrz.tu-berlin.de)
Date: 11/18/03
- Next message: Anno Siegel: "Re: extract block of text"
- Previous message: Josef Möllers: "Re: How do I substitute the 2nd occurance of a comma from a text file"
- In reply to: James Willmore: "Re: multilinepattern match"
- Next in thread: James Willmore: "Re: multilinepattern match"
- Reply: James Willmore: "Re: multilinepattern match"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Nov 2003 12:24:28 GMT
James Willmore <jwillmore@myrealbox.com> wrote in comp.lang.perl.misc:
> genericax@hotmail.com (Sara) wrote in message
> news:<776e0325.0311171042.1adbfb60@posting.google.com>...
> <snip>
> > #!/usr/bin/perl -wd
>
> Just a suggestion ...
> when posting code, please avoid using the '-d' switch. I realize that
> it throws one into the debugger, but others may not. Given the
> various states of experience in Perl found in this newsgroup, this
> could confuse the not so experienced reader.
>
> Again - just a suggestion :-)
>
> > $_ = "a bunch of
> > stuff
> > is here..
> > end;
> > /
> > thats all
> > folks";
>
> Another suggestion is avoid setting '$_'. It's a special variable and
> one should avoid setting it. Again - I understand what you're trying
> to demonstrate, but those less experienced may not.
There is nothing wrong with setting $_ in your main script when it's
handy (and it often is). Care must be taken when doing this in a
subroutine. Then you *must* localize $_ before setting it, or you're
in for some nasty surprise.
Anno
- Next message: Anno Siegel: "Re: extract block of text"
- Previous message: Josef Möllers: "Re: How do I substitute the 2nd occurance of a comma from a text file"
- In reply to: James Willmore: "Re: multilinepattern match"
- Next in thread: James Willmore: "Re: multilinepattern match"
- Reply: James Willmore: "Re: multilinepattern match"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|