in reply to Syntax Problem / Padre vs Command Line
I'm going to have to refresh or deepen my knowledge of the usage of "farction". :-)
Possibly that's just a typo, in which case, this may be too:
print "Line number $. ls: $_";
which may be intended to be:
print "Line number $. is: $_";
OTOH, if it's really intended to be ls you may profit by reading about exec, system and backticks.
Or is there some other typo which merely makes ls appear nonsensical inside double quotes in a print statement?
Afterthought: Did you intend your script to look like this?
#!/usr/bin/perl # Cosmo Learning File Open operation PERL(II) class lecture. 814366 $fname = "814366.txt"; open XYZ, $fname, or die "Error open: $!"; while (<XYZ>) { print "Line number $. ls: $_"; } # Does not farction "line 7: syntax error near unexpected token from + shell!!`)'
If so, as you've been advised, use code tags, or -- more verbosly -- pay attention to the advisories below the text entry box and read Markup in the Monastery.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Syntax Problem / Padre vs Command Line
by ww (Archbishop) on Dec 28, 2009 at 01:24 UTC |