help with perl code

From: mike (s99999999s2003_at_yahoo.com)
Date: 12/31/03


Date: 30 Dec 2003 20:57:05 -0800

hi
i have written some perl code like this

$telnetcmd << "EOF";
perl -ne "chdir(/tmp); while ($file = <*.txt>) { print stat($file); }"
EOF
print $telnetcmd;

it give me some errors:

syntax error at ./test.pl line 3, near "-ne"
Semicolon seems to be missing at ./test.pl line 3.
Execution of ./test.pl aborted due to compilation errors.

what is wrong with the code...?? thanks



Relevant Pages

  • help with perl code
    ... print $telnetcmd; ... Semicolon seems to be missing at ./test.pl line 3. ... Execution of ./test.pl aborted due to compilation errors. ...
    (comp.lang.perl.misc)
  • Re: statement values
    ... execution and source text parsing. ... The first semicolon is part of the StatementExpression that consists ... JavaScript is served as raw source right away to client and ... execution code - lets keep calling it "bytecode" though formally it is ...
    (comp.lang.javascript)
  • Re: Finding missing syntax element
    ... >> Turn on use strict for starters, and use warnings. ... >> perl has no way of knowing what's really missing. ... >> is that eval needs a semicolon, but the compiler doesn't know why it ... > Semicolon is optional before the closing curly brace and it doesn't ...
    (perl.beginners)
  • Re: script advice
    ... Basically I'm inputting a filename, ... of files with the sander program to generate an rst file used to ... Semicolon seems to be missing at t.pl line 1. ...
    (comp.lang.perl.misc)
  • Re: Subroutine(s) at end re-execute(s) if EXIT statement missing
    ... in the procedure is missing, ... without complaining about a missing execution of ... responsibility to not make DCL re-enter a GOSUB'd ... most programming languages (and we all know ...
    (comp.os.vms)