in reply to Just Another Perl Article
One question though: I don't really get this little piece of code:
Why would it put a newline to the end of each line during the print? You say that "$\ goes where you put a \n in your print()" but you're chomp()ing the newlines.$\ = $/; # ORS = IRS = "\n" $, = ":"; # OFS = "," while (<PASSWD>) { chomp; # removes $/ from $_ my @f = split $,; # splits $_ on occurrences of $, # fool around with @f print MOD @f; }
What do I miss here?
Hmm, now looking at it I get even more questionmarks on my forehead:
Still, as I said above: good read!
| Regards... | Stefan |
| you begin bashing the string with a +42 regexp of confusion | |
ps: a typo in your article:
should probably be "being read from", er?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Just Another Perl Article
by davorg (Chancellor) on Nov 02, 2001 at 15:22 UTC |