Hi,
I'm new to perl. The following code is wrong., and I can not spot
it. Any suggestion? Thx.
#!/usr/bin/perl -w
&init_words ();
sub init_words{
while ( $filename=<*.secret> ){
open( WORDLIST, $filename ) ||
die "Can not open $filename: $!";
if ( -M WORDLIST < 7 ){
while ( $name = <WORDLIST> ){
chmop( $name );
$word = <WORDLIST>;
chmop( $word );
$word{$name} = $word;
}
}
else{
rename( $filename, "$filename.old" ) ||
die "Can not rename $filename to $filename.old.";
}
close( WORDLIST );
}
}
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/