Hi all,
I wrote the following simple code to sort UNIX's password file, it
works fine but I can only display the ouput on the stdout. How can I
make it write the output to a file?
Thanks,

#!/bin/perl -w
#
use strict;
open(myFILE, '|-','awk','-F:','s[$1]++==0' ) or die $!;
open(passwdFH, "passwd");
while (<passwdFH>) { print myFILE; }
close(myFILE);

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to