MAN page from RedHat Other perl-5.004-0.1.i386.rpm
Text::ParseWords
Section: Perl Programmers Reference Guide (3)
Updated: perl 5.004, patch 04
Index NAME
Text::ParseWords - parse text into an array of tokens
SYNOPSIS
use Text::ParseWords; @words = "ewords($delim, $keep, @lines); @words = &shellwords(@lines); @words = &old_shellwords(@lines);
DESCRIPTION
&
quotewords() accepts a delimiter (which can be a regular expression)and a list of lines and then breaks those lines up into a list ofwords ignoring delimiters that appear inside quotes.
The $keep argument is a boolean flag. If true, the quotes are keptwith each word, otherwise quotes are stripped in the splitting process.$keep also defines whether unprotected backslashes are retained.
A &shellwords() replacement is included to demonstrate the new package.This version differs from the original in that it will _NOT_ defaultto using $_ if no arguments are given. I personally find the old behaviorto be a mis-feature.
"ewords() works by simply jamming all of @lines into a singlestring in $_ and then pulling off words a bit at a time until $_is exhausted.
AUTHORS
Hal Pomeranz (pomeranzAATTnetcom.com), 23 March 1994
Basically an update and generalization of the old shellwords.pl.Much code shamelessly stolen from the old version (author unknown).
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- AUTHORS
This document was created byman2html,using the manual pages.