Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: No such file or directory

by CountZero (Bishop)
on Jan 10, 2013 at 07:35 UTC ( #1012607=note: print w/replies, xml ) Need Help??


in reply to No such file or directory error

Not an answer to your question, but this looks rather "strange":
if ($num =~ /1-9/)

Unless you want to check whether $num contains the string '1-9', it will do not what you want, which is probably to check whether $num only contains the figures 1 to 9:

if ($num =~ /^[1-9]+$/)
But watch out! The figure 10 will not be accepted by this. Why don't you just do:
if ($num >= $minimum and $num <= $maximum and int($num) == $num) { ... + }
for whatever the acceptable minimum and maximum values are.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012607]
help
Chatterbox?
[stevieb]: I have fixed a boatload of issues across several of my distributions, including a couple that have been nagging for a very long time and were exceptionally difficult to solve. Saving $ before we move, so thought I'd have a code session...
[stevieb]: ...session weekend. Went far better than I could have imagined. Even got a bunch of stuff soldered for another one of my electronics projects on the go, and am working on a fix for a MetaCPAN::Client issue I found
[shmem]: the smaller your boat is, the smaller is the load...
shmem is going to look for problems with C++. Urgh.
choroba has worked on the Pull Request Challenge
[stevieb]: shmem I had to do that yesterday and earlier today (C++ issues). It was only fun after I figured it all out.
[stevieb]: it won't be long before I likely won't have much time to do a lot of coding...
[shmem]: stevieb: in my case, it's just light controlling via some chip from the arduino family, and a couple of MPR121 sensor chips

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-06-25 22:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (571 votes). Check out past polls.