*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> perl5/Text::ParseWords (3)              
Title
Content
Arch
Section
 

Contents


Text::ParseWords(3)					   Text::ParseWords(3)


NAME    [Toc]    [Back]

     Text::ParseWords -	parse text into	an array of tokens

SYNOPSIS    [Toc]    [Back]

       use Text::ParseWords;
       @words =	&quotewords($delim, $keep, @lines);
       @words =	&shellwords(@lines);
       @words =	&old_shellwords(@lines);

DESCRIPTION    [Toc]    [Back]

     &quotewords() accepts a delimiter (which can be a regular expression) and
     a list of lines and then breaks those lines up into a list	of words
     ignoring delimiters that appear inside quotes.

     The $keep argument	is a boolean flag.  If true, the quotes	are kept with
     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_ default to
     using $_ if no arguments are given.  I personally find the	old behavior
     to	be a mis-feature.

     &quotewords() works by simply jamming all of @lines into a	single string
     in	$_ and then pulling off	words a	bit at a time until $_ is exhausted.

AUTHORS    [Toc]    [Back]

     Hal Pomeranz ([email protected]), 23 March 1994

     Basically an update and generalization of the old shellwords.pl.  Much
     code shamelessly stolen from the old version (author unknown).


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
XmStringTableUnparse HP-UX A convenience function that converts a table of compound strings to an array of text
strtok_r FreeBSD string tokens
afslog OpenBSD obtains AFS tokens
strtok FreeBSD string tokens
strtok_r NetBSD string tokens
strtok NetBSD string tokens
strtok Linux extract tokens from strings
strtok Tru64 Split string into tokens
strtok_r Tru64 Split string into tokens
unpack IRIX Unpacks an array of rank one into an array under control of a mask
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service