Text::Shellwords(3pm)

Text::Shellwords3pm

Usage

  use Text::Shellwords;
  @words = shellwords($line);
  @words = shellwords(@lines);
  @words = shellwords();

Overview

This is a thin wrapper around the shellwords.pl package, which comes preinstalled with Perl. This module imports a single subroutine, shellwords(). The shellwords() routine parses lines of text and returns a set of tokens using the same rules that the Unix shell does for its command-line arguments. Tokens are separated by whitespace, and can be delimited by single or double quotes. The module also respects backslash escapes.

If called with one or more arguments, shellwords() will treat each argument as a line of text, parse it, and return the tokens. If called without any arguments, shellwords() will parse $_ and clobber it.

Releases

Unchanged in 2 releases since Debian 3.1 (Sarge).

  1. 3.1–4.0

Bugs

Please report them.

Author

Lincoln Stein <[email protected]>.

Copyright (c) 2001 Cold Spring Harbor Laboratory

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty.

From libtext-shellwords-perl 1.03-1 in Debian 4.0 (Etch). Parsed by carta from the page's man source.