Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Useless use of string eq

by shmem (Chancellor)
on Dec 06, 2007 at 15:08 UTC ( #655430=note: print w/replies, xml ) Need Help??


in reply to Useless use of string eq

and depending what has been written there, alter a variable:
... if ($ARGV[1] eq '-SMC') {$cust eq "SMC";} ...

You don't alter, you are comparing, twice. It's the second comparison ($cust eq "SMC") which leads to the warning. You mean:

if ($ARGV[1] eq '-SMC') {$cust = "SMC";}

But I guess for what you want, this is enough:

#!/usr/local/bin/perl -w use strict; my($target, $cust, $cotime) = @ARGV; $cust =~ s/^-//; # strip leading dash

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2022-01-29 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (74 votes). Check out past polls.

    Notices?