C
Charles Fitzgerald
Given the data file beloe (it's a "flattened" AIX /etc/security/passwd
file)
I am attempting to split it into its component parts. The following
yields an error:
#!/usr/bin/perl
while (<STDIN>) {
do
########print;
($username, @therest ) = split /:/,$_;
print $username,"\n";
done
}
The error messages is:
Too many arguments for do "file" at ./newhash line 5, near ") ="
Execution of ./newhash aborted due to compilation errors.
Uncommenting the print; statement makes it work. WHY??!?
Please
root: + password = abcabcabcabca + lastupdate =
1066703040 + flags = +
daemon: + password = * +
bin: + password = * +
sys: + password = * +
adm: + password = * +
uucp: + password = * +
nobody: + password = * +
lpd: + password = * +
mike: + password = abcabcabcabcA + lastupdate = 1030991397
+ flags = ADMCHG +
darren: + password = abcabcabcabca + lastupdate = 969316376
+ flags = +
ron: + password = abcabcabcabca + lastupdate = 983309074 +
flags = +
file)
I am attempting to split it into its component parts. The following
yields an error:
#!/usr/bin/perl
while (<STDIN>) {
do
########print;
($username, @therest ) = split /:/,$_;
print $username,"\n";
done
}
The error messages is:
Too many arguments for do "file" at ./newhash line 5, near ") ="
Execution of ./newhash aborted due to compilation errors.
Uncommenting the print; statement makes it work. WHY??!?
Please
root: + password = abcabcabcabca + lastupdate =
1066703040 + flags = +
daemon: + password = * +
bin: + password = * +
sys: + password = * +
adm: + password = * +
uucp: + password = * +
nobody: + password = * +
lpd: + password = * +
mike: + password = abcabcabcabcA + lastupdate = 1030991397
+ flags = ADMCHG +
darren: + password = abcabcabcabca + lastupdate = 969316376
+ flags = +
ron: + password = abcabcabcabca + lastupdate = 983309074 +
flags = +