Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How to pass directory variable using IPC::System::Simple

by ablanke (Prior)
on Jul 25, 2016 at 07:57 UTC ( #1168450=note: print w/replies, xml ) Need Help??


in reply to How to pass directory variable using IPC::System::Simple

1. Yes:
my @t = ( localtime(time) )[ reverse( 3 .. 5 ) ]; #get year month and +day from current localtime $t[0] += 1900; # see localtime doc for details $t[1]++; # see localtime doc for details my $savedir = '/folder/name/' . sprintf( '%04d%02d%02d', @t ); say $savedir;
/folder/name/20160725
2. In this case the scalar $savedir should be an string, so you have to quote it. (e.g. my $savedir = 'foldername';

Replies are listed 'Best First'.
Re^2: How to pass directory variable using IPC::System::Simple
by bill5262 (Acolyte) on Jul 25, 2016 at 08:17 UTC

    gracias!!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2022-05-25 12:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (90 votes). Check out past polls.

    Notices?