Re: There is a error in a simple source

2008-12-28 Thread John W. Krahn
John W. Krahn wrote: mobile.parmeni...@gmail.com wrote: I'm new to perl. The following code is wrong., and I can not spot it. Any suggestion? Thx. #!/usr/bin/perl -w #!/usr/bin/perl use warnings; use strict; &init_words (); init_words(); my %word; sub init_words{ while ( $filenam

Re: There is a error in a simple source

2008-12-28 Thread John W. Krahn
emenzhaow...@gmail.com wrote: looks like you missed the closing brace of sub. Incorrect. It is there. John -- Those people who think they know everything are a great annoyance to those of us who do.-- Isaac Asimov -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additio

Re: There is a error in a simple source

2008-12-28 Thread emenzhaow...@gmail.com
looks like you missed the closing brace of sub. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: There is a error in a simple source

2008-12-27 Thread John W. Krahn
mobile.parmeni...@gmail.com wrote: Hi, Hello, I'm new to perl. The following code is wrong., and I can not spot it. Any suggestion? Thx. #!/usr/bin/perl -w #!/usr/bin/perl use warnings; use strict; &init_words (); init_words(); my %word; sub init_words{ while ( $filename=<*.sec

There is a error in a simple source

2008-12-27 Thread mobile . parmenides
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 WORDLIS