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

Re: text munging utility

by jeffa (Bishop)
on Jan 26, 2004 at 22:01 UTC ( [id://324284]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # generate numeric comparison routines
    sub build_num_comp {
    ...
      elsif($cexp eq 'nr') { return sub { return ($_[0] !~ /$cval/); } }
      else { print "Invalid comparison, use ax -h for help.\n"; exit(1); }
    }
    
  2. or download this
    sub build_num_comp {
       my $truth = eval "@_";
    ...
    
    print build_num_comp(5,'==',5)->() ? 'yes' : 'no';
    print build_num_comp(5,'!=',5)->() ? 'yes' : 'no';
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 17:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found