SPUG:Confused field parser seeks...

Tom Legrady legrady at earthlink.net
Fri May 23 20:03:22 CDT 2003


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






More information about the spug-list mailing list