Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: getting a while loop to terminate

by Datz_cozee75 (Pilgrim)
on Apr 18, 2012 at 04:28 UTC ( #965609=note: print w/replies, xml ) Need Help??


in reply to Re^2: getting a while loop to terminate
in thread getting a while loop to terminate

I guess I don't follow you here:

$ perl -le " die 666 if q/0/ " $ perl -le " die 666 if $what = q/0/ " syntax error at -e line 1, near "if =" Execution of -e aborted due to compilation errors. $

Replies are listed 'Best First'.
Re^4: getting a while loop to terminate
by Anonymous Monk on Apr 18, 2012 at 04:38 UTC

    My shell doesn't interpolate $what, as you can see from the session I posted, use single quotes if your shell interpolates doubles

    Or you could even omit  $what =

    Whether it is assigned to a variable or not , '0' is always false

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://965609]
help
Chatterbox?
[LanX]: but the one in Metz is pretty! ;-p
[LanX]: Station Palace

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2017-12-13 16:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (369 votes). Check out past polls.

    Notices?