SPUG:Confused field parser seeks...
John Subaykan
cansubaykan at hotmail.com
Fri May 23 21:33:57 CDT 2003
This was the original poster's message. You're right, the colons don't
print out.
Also, I agree with the other response to this question, splitting on the
colons is more straightforward than capturing $1 - $7.
John
----Original Message Follows----
Why do you have colons in your output when there are no colons in your
print statement?
> This works as I expect it to:
>
my $var="nobody:x:99:99:Nobody:/:/sbin/nologin";
>
> $var=~ /(.+):(.+):(.+):(.+):(.+):(.+):(.+)/;
>
>
> print "$1 $2 $3 $3 $4 $5 $6 $7\n\n";
>
> it prints nobody:x:99:99:Nobody:/:/sbin/nologin
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail
More information about the spug-list
mailing list