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

Re (2): Hash/Array of Regular Expressions? (code)

by deprecated (Priest)
on Jun 24, 2001 at 18:00 UTC ( [id://91066]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @array = map { qr{$_} } ('^abcd', 'cd[ef]g', 'cat$');
    
  2. or download this
    # timtowtdi...
    foreach ( qw{ ^abcd cd[ef]g cat$ } ) { push @array, qr{$_} };
    ...
    
    # or the way I think is most clear and most sane....
    @array = ( qr{^abcd}, qr{cd[ef]g}, qr{cat$} );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2024-04-19 10:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found