Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: to print a system command

by vinoth.ree (Prior)
on Feb 12, 2014 at 13:35 UTC ( #1074623=note: print w/ replies, xml ) Need Help??


in reply to to print a system command

Hi oikool

If you need to use the double quote inside the string, you can use the backslash character.

system("date -s \"2 June 2010 18:00:00\"");

The single quote can be used without a backslash.


All is well


Comment on Re: to print a system command
Download Code
Replies are listed 'Best First'.
Re^2: to print a system command
by johngg (Abbot) on Feb 12, 2014 at 15:36 UTC

    Better still, use a quoting construct.

    system qq{date -s "2 June 2013 18:00:00"};

    Cheers,

    JohnGG

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1074623]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2015-07-08 00:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls