Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Perl one-liner Quotes help

by alexbio (Monk)
on Jul 15, 2010 at 18:36 UTC ( [id://849826]=note: print w/replies, xml ) Need Help??


in reply to Perl one-liner Quotes help

In the second and third examples, you forgot a final '

If you want ' print working try

perl -e "print 'hello \'\'  ' "

or

perl -e "print \"hello \'\'  \" "

(Like the first example but with \')

The second and third, wait for something because they (with -lane) mean

BEGIN { $/ = "\n"; $\ = "\n"; } LINE: while (defined($_ = <ARGV>)) { chomp $_; our(@F) = split(' ', $_, 0); print 'hello '; }

Update: Just inverted order of things and corrected some errors.

Alex's Log - http://alexlog.co.cc

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found