Help for this page

Select Code to Download


  1. or download this
    my @list = qw( a b c );
    GetOptions ('list=s{,}' => \&list);
    ...
        # modifies the file scoped @list array
        @list = split /,/, $_[1];
    }
    
  2. or download this
    C:\test>list_test.pl
    $VAR1 = [
    ...
              'b',
              'c'
            ];
    
  3. or download this
    C:\test>list_test.pl -list d,s,4,f,"test string"
    $VAR1 = [
    ...
              'f',
              'test string'
            ];