Kentdn has asked for the wisdom of the Perl Monks concerning the following question:
This is only a snippet but it the area of the code I am having difficulty with. Thanks for the help!my $word1; { open( FILE, "< $filename1" ) or die( "can't find file1: $!" ); my $file = <FILE>; ( $word1 ) = $file =~ /EditorName\b.+\b(\s*)/; close FILE; } my $word2; { open( FILE, "< $filename1" ) or die( "can't find file2: $!" ); my $file = <FILE>; ( $word2 ) = $file =~ /EditorCommand\b.+\b(\s*)/; close FILE; } print $word1, $word2;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 1: returning word from a file position
by tilly (Archbishop) on Jan 22, 2002 at 10:48 UTC | |
|
Re: returning word from a file position
by Zaxo (Archbishop) on Jan 22, 2002 at 10:50 UTC | |
|
Re: returning word from a file position
by maverick (Curate) on Jan 22, 2002 at 10:21 UTC | |
|
and for your future reference...
by dash2 (Hermit) on Jan 22, 2002 at 16:33 UTC | |
by Kentdn (Novice) on Jan 23, 2002 at 05:11 UTC |