in reply to passing arguments to subroutine
I would rewrite the copying code as follows:
mkdir $i/controlpanel/ unless -d "$i/controlpanel"; system 'cp', '-fRp', $dir, $i" and die "cp went boom ($?).\n";
When oh when will people check for system errors?
shift is as good a way as any for reading the arguments passed to a routine.
update: hmm, the fact that the mkdir call is not checked is left as an exercise to the reader (it also needs a protection mask à la 0500).
--
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: passing arguments to subroutine
by c (Hermit) on Jul 23, 2001 at 22:38 UTC | |
by redmist (Deacon) on Jul 24, 2001 at 00:29 UTC | |
by PrakashK (Pilgrim) on Jul 24, 2001 at 00:43 UTC |