Re: Searching in a line



lerameur wrote:
my $log = 'file.txt';
open my $fh, '<', $log or die "cannot open '$log': $!\n";
while (<$fh>) {

my $val =(split( /,/,$log))[3]
print $val, "\n";

}
close $fh;

getting compilation error.

Well, the indentation gives it away: the my $val=... statement is missing
the trailing semicolon, dude.

New to perl, different then C and Basic

Put neither of those is accepting syntax errors, either.

jue


.



Relevant Pages

  • Re: aspose.license
    ... I must be missing something fundamental. ... Every time I try to run the ASPOSE examples, ... Compilation Error ... be found (are you missing a using directive or an assembly reference?) ...
    (microsoft.public.dotnet.languages.vb.controls)
  • Re: 0x8007007e during compilation
    ... I eventually managed to figure out what was missing by using ... use of functions in several dlls. ... When I compile I get the following message in the compilation error ... "The specified module could not be found. ...
    (microsoft.public.vsnet.general)
  • Re: Parse errors in eqnarray
    ... I get the following compilation error ... Missing number, treated as zero. ... the \\ command at the end of the second line supports an optional ...
    (comp.text.tex)
  • Re: How can i show DATAGRID date with out any time frame.
    ... Iam Binding like this ... Compilation Error ... An error occurred during the compilation of a resource ... could not be found (are you missing a using directive or an assembly ...
    (microsoft.public.dotnet.languages.csharp)