D
DrRo183
I have to write a script that will act like the 'comm' utility. My
problem is when trying to read whether the user has entered -123 or -1
or -1...etc.
I currently have:
if(m/[\-][0-3][0-3]?[0-3]?[^a-z]/g){
print "HOOORAAAAY!\n";
}
So, this should check for all -123, -1, -12, -32, etc. But I would like
to output an error message if the user enters something like:
-123333
or
-123abc
Something is wrong with the [^a-z] part. Could someone help me clean
this up? Thanks.
problem is when trying to read whether the user has entered -123 or -1
or -1...etc.
I currently have:
if(m/[\-][0-3][0-3]?[0-3]?[^a-z]/g){
print "HOOORAAAAY!\n";
}
So, this should check for all -123, -1, -12, -32, etc. But I would like
to output an error message if the user enters something like:
-123333
or
-123abc
Something is wrong with the [^a-z] part. Could someone help me clean
this up? Thanks.