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

Re: Process File Different Way Based on Passed in Argument

by vinoth.ree (Monsignor)
on Jan 22, 2016 at 04:00 UTC ( #1153344=note: print w/replies, xml ) Need Help??


in reply to Process File Different Way Based on Passed in Argument

Hi,

If you use '==' to compare strings you will get error as below

Argument "sqlerrors" isn't numeric in numeric eq (==) at args.pl line 11, <FILE> line 1.
Argument "sqlerrors" isn't numeric in numeric eq (==) at args.pl line 11, <FILE> line 1.
Argument "othererrors" isn't numeric in numeric eq (==) at args.pl line 17, <FILE> line 1.
Argument "missingfile" isn't numeric in numeric eq (==) at args.pl line 23, <FILE> line 1.

eq is for comparing strings; == is for comparing numbers.

== does a numeric comparison: it converts both arguments to a number and then compares them.

eq does a string comparison: the two arguments must match lexically (case-sensitive)


All is well. I learn by answering your questions...
  • Comment on Re: Process File Different Way Based on Passed in Argument

Replies are listed 'Best First'.
Re^2: Process File Different Way Based on Passed in Argument
by afoken (Canon) on Jan 22, 2016 at 05:00 UTC

    How to remember that

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2020-09-19 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (114 votes). Check out past polls.

    Notices?