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

Re: Re: passing arguments to subroutine

by c (Hermit)
on Jul 23, 2001 at 22:38 UTC ( [id://99116]=note: print w/replies, xml ) Need Help??


in reply to Re: passing arguments to subroutine
in thread passing arguments to subroutine

More than one mistake in that code. I'd like to say that I left that mkdir check out because the code is still in the beginning stages, but I like to think of myself as an honest guy.

mkdir("$i/controlpanel", 0755) or die "Problems making dir : $!\n" unl +ess ( -d "$i/controlpanel" ); system("cp -fRp $dir/controlpanel") or die "Problems copying dir : $!\ +n";

better?

humbly -c

Replies are listed 'Best First'.
(redmist) Re: Re: Re: passing arguments to subroutine
by redmist (Deacon) on Jul 24, 2001 at 00:29 UTC

    All the more reason for you to check your mkdir if the code is in it's beginning stages. You want to throw all the sanity checking devices that you can think of in your code (especially beta code).

    redmist
    Silicon Cowboy
Re: Re: Re: passing arguments to subroutine
by PrakashK (Pilgrim) on Jul 24, 2001 at 00:43 UTC
    Change:
    system("cp -fRp $dir/controlpanel") or die "Problems copying dir : $!\ +n";
    To:
    system("cp -fRp $dir/controlpanel") == 0 or die "Problems copying dir +: $!\n";
    system returns the exit status of the program being run, and the programs conventionally return 0 (zero) on success.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-29 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found