Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Useless use of string eq

by shmem (Chancellor)
on Dec 06, 2007 at 15:08 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found