Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Passing variables into regular expressions

by johngg (Canon)
on Apr 20, 2006 at 13:02 UTC ( [id://544589]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    my ($span_s) = $str =~ /(\d\d.*?\d\d)/s;
    print "\$span_s -- $span_s\n\n";
    
  2. or download this
    @digits -- 12 34 56 78
    
    ...
    
    $span_s -- 12c
    de34
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-03-28 23:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found