GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Shellwords(3) User Contributed Perl Documentation Shellwords(3)

Text::Shellwords

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

This used to be a wrapper around shellwords.pl, but has now been superseded by Text::ParseWords. Use that module insteade. If you use this module, it will simply report the shellwords() function from Text::ParseWords.

The old description follows:

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.

Note that the old behavior of parsing $_ if no arguments are provided is no longer supported. Sorry.

Please report them.

shellwords.pl

Lincoln Stein <lstein@cshl.org>.

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.

2005-11-10 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.