Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Creating arrays with glob patterns without metacharacters

by Lotus1 (Curate)
on Jan 05, 2018 at 17:09 UTC ( #1206771=note: print w/replies, xml ) Need Help??


in reply to Re: Creating arrays with glob patterns without metacharacters
in thread Creating arrays with glob patterns without metacharacters

I also use ':bsd_glob'. I could show how if I use a function someone else potentially creates using glob to create an array it would quit working with bsd_glob. Thanks.

Update: demo code.

use strict; use warnings; use Data::Dumper; use File::Glob ':bsd_glob'; my @arr1 = get_list1(); print Dumper(\@arr1); my @arr2 = get_list2(); print Dumper(\@arr2); sub get_list1 { return < abc def ghi >; } sub get_list2 { return qw( abc def ghi ); } __DATA__ $VAR1 = [ ' abc def ghi ' ]; $VAR1 = [ 'abc', 'def', 'ghi' ];

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1206771]
help
Chatterbox?
[choroba]: Good morning!

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2018-05-21 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?