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' ];
|
|---|