Help for this page

Select Code to Download


  1. or download this
    my @list= qw(first_string second_string);
    @list = map((s/_string$// and $_), @list);
    print @list;
    
  2. or download this
    >perl -wMstrict -le
    "my @list= qw(first_string  second_string  THIRD  fourth_string);
    ...
     printf qq{'$_'  } for @list;
    "
    'first'  'second'  ''  'fourth'