On Dec 10, Paul Kraus said:
>instead of setting my own $error can I instead just check if &mount
>completed ok? Is there a better way to do this?
Sure.
>sub mount{
> !system
>"mount","-t","smbfs","-o","username=$ini{$section}{username},password=$i
>ni{$section}{password}",
>
>"//$ini{$section}{machine}/$ini{$section}{share}","/mnt/backup" or
>$error=1;
>}
Why not use the return value of system()?
sub mount {
system(
"mount", "-t", "smbfs",
"-o",
"username=$ini{$section}{username},password=$ini{$section}{password}",
"//$ini{$section}{machine}/$ini{$section}{share}",
"/mnt/backup",
) == 0;
}
next unless mount();
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]