Help for this page

Select Code to Download


  1. or download this
    @out_list=@in_list;
    s/foo(.*?)bar/$1 baz/ for @in_list;
    
  2. or download this
    @out_list = map {local $_=$_; s/foo(.*?)bar/$1 baz/; $_ } @in_list;
    
  3. or download this
    sub ro_map (&@){
        my $sub=shift;
    ...
    my @out=ro_map{s/x/y/g}@in;
    print "original: @in\n";
    print "changed : @out\n";
    
  4. or download this
    # lc the filenames and create a set of filespecs from them.
    my @filespecs=map{ $_=lc($_); File::Spec->joinpath($path,$_) } @files;