Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re3: Use an array slices

by hypochrismutreefuzz (Scribe)
on Mar 17, 2003 at 15:04 UTC ( #243650=note: print w/replies, xml ) Need Help??


in reply to Re3: Use an array slices
in thread Use an array slices

It produces the ZERO message :) Matching the whole string produces better results:

#!/usr/local/bin/perl use strict; use warnings; my $value = 10; SWITCH: for ($value) { /^0\z/ && do {print "ZERO\n"; last; }; /^1\z/ && do {print "ONE\n"; last; }; /^10\z/ && do {print "TEN\n"; last; }; print "NONE OF THE ABOVE\n"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://243650]
help
Chatterbox?
[mark4]: thanks. I installed "PAR-packager" and pp is working. BTW, it is pp.bat that was needed.
[mark4]: Sorry, There was a typo in my last message. I installed "PAR-Packer" and I now have a pp.bat and all is working well. Thanks again for your help.

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2018-01-19 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (223 votes). Check out past polls.

    Notices?