Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: to print a system command

by vinoth.ree (Parson)
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
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 perusing the Monastery: (6)
As of 2014-07-30 04:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls