Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

RFC: Playing with glob

by Lady_Aleena (Priest)
on Sep 15, 2015 at 19:25 UTC ( [id://1142125]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub glob_array {
      my (%opt) = @_;
    ...
      
      return \@array;
    }
    
  2. or download this
    my @colors     = qw(red green blue);
    my @directions = qw(north south east west);
    my @numbers    = (1..3);
    
    my $array = glob_array( 'arrays' => [\@colors, \@directions, \@numbers
    +], 'joiner' => ' ', 'space holder' => '__' );
    
  3. or download this
    $VAR1 = [
              'red north 1',
    ...
              'blue west 2',
              'blue west 3'
            ];
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1142125]
Approved by Old_Gray_Bear
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-25 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found