Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 lurking in the Monastery: (3)
As of 2014-09-21 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (165 votes), past polls