home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl501m.zip / lib / auto / Text / ParseWords / shellwords.al < prev   
Text File  |  1995-07-03  |  503b  |  19 lines

  1. # NOTE: Derived from lib/Text/ParseWords.pm.  Changes made here will be lost.
  2. package Text::ParseWords;
  3.  
  4. sub shellwords {
  5.  
  6.     # A &shellwords() replacement is included to demonstrate the new package.
  7.     # This version differs from the original in that it will _NOT_ default
  8.     # to using $_ if no arguments are given.  I personally find the old behavior
  9.     # to be a mis-feature.
  10.  
  11.     local(@lines) = @_;
  12.     $lines[$#lines] =~ s/\s+$//;
  13.     "ewords('\s+', 0, @lines);
  14. }
  15.  
  16.  
  17.  
  18. 1;
  19.