LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Perl Question.

[ILUG] Perl Question.

Niall O Broin niall at linux.ie
Wed Jun 8 14:08:05 IST 2005


On 8 Jun 2005, at 13:22, Kevin O'Riordan wrote:

>>> As Niall pointed out, you could probably join the arguments together
>>> as a single string before calling system() with that single argument.
>>> Then the shell would get to parse the line ...
>
>> As the man page you quoted points out, the shell is only involved when
>> the command line for system contains shell metacharacters. Martin's
>> didn't so his perl program won't use the shell.
>
> According to the bash manpage, an unquoted space character itself is a
> shell metacharacter.  A little testing shows that you're right though 
> --
> the shell is not called when the example arguments are joined together.
> I guess perl has it's own idea of what shell metacharacters are?

I guess an unquoted space character itself is a shell metacharacter 
only in so far as it acts as a separator. perl doesn't worry about 
that, because if a system command line has no OTHER shell 
metacharacters, perl splits the command line on whitespace, and calls 
execvp directly with the results of that split.


Niall




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell