Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: syntax error at example.pl line 1

by ExReg (Priest)
on Jun 17, 2016 at 01:37 UTC ( #1165927=note: print w/replies, xml ) Need Help??


in reply to syntax error at example.pl line 1

After you add that missing semicolon, you might want to look at single quotes around a variable name towards the end.

Replies are listed 'Best First'.
Re^2: syntax error at example.pl line 1
by AnomalousMonk (Bishop) on Jun 17, 2016 at 05:43 UTC

    If you're thinking of
        print "'$cheese' ";
    it should be ok because the single-quotes are actually in | actually literal characters within a double-quote operator:

    c:\@Work\Perl\monks>perl -wMstrict -le "my $cheese = 'limburger'; print \"'$cheese' \"; " 'limburger'


    Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1165927]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2021-10-22 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (85 votes). Check out past polls.

    Notices?