develooper Front page | perl.beginners | Postings from December 2002

Return Status

Thread Next
From:
Paul Kraus
Date:
December 10, 2002 14:27
Subject:
Return Status
Message ID:
01a301c2a09b$57978cc0$64fea8c0@pkrausxp
instead of setting my own $error can I instead just check if &mount
completed ok? Is there a better way to do this?

Code Snip
---------
Foreach loop
	...
        &mount;
        next if ($error == 1);
        mkdir "//backup/$ini{$section}{machine}" unless (-e
"/backup/$ini{$section}{machine}");
 }

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;
}

Paul Kraus
Network Administrator
PEL Supply Company
216.267.5775 Voice
216-267-6176 Fax
www.pelsupply.com

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About