I believe you want to print $!. Give it a try.
> Hello > > This does not work. > > `cp $srcfile $dstfile`; || do { > print "cannot copy $srcfile to $dstfile"; > }; > > do is also execute if cp working fine. Whz is this so? The next thing I > would like to > know how I can print the cp's error message. > > Thanks > > Urs > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>