Re: Recognizing integer as string for if statement

2007-08-14 Thread John W. Krahn
Jesse Farrell wrote: Is there a way to have a variable recognized as a string even if it contains a valid integer? I have a script that is taking strings from a file that can be numbers, including zero. I have an if statement to simply see if the variable exists (otherwise I need to throw an er

RE: Recognizing integer as string for if statement

2007-08-14 Thread Jesse Farrell
arrell Cc: beginners@perl.org Subject: RE: Recognizing integer as string for if statement Unless im being very stupid in what your requirements are If(defined $variable && $variable ne "0") { } -Original Message- From: Jesse Farrell [mailto:[EMAIL PROTECTED] Sent: 14 Au

RE: Recognizing integer as string for if statement

2007-08-14 Thread Andrew Curry
Unless im being very stupid in what your requirements are If(defined $variable && $variable ne "0") { } -Original Message- From: Jesse Farrell [mailto:[EMAIL PROTECTED] Sent: 14 August 2007 21:18 To: beginners@perl.org Subject: Recognizing integer as string for if statement Is there a