in reply to Re^3: Undefined subroutine &main::copy called
in thread Undefined subroutine &main::copy called
#! /usr/bin/perl -W use File::Copy::Recursive qw (dircopy); use warnings; print "Hi this is a script to copy a file \n"; print " Enter the name of the file to be copied with the compete path\ +n"; $Source = <STDIN>; chomp($Source); print "Enter the full path of the Destination \n"; $Destination = <STDIN>; chomp($Destination); if( -e $Source) { print "copying $Source to $Destination \n"; dircopy("$Source","$Destination") or die "File cannot be copied. +"; } else { print " The File doesnot Exist \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Undefined subroutine &main::copy called
by roboticus (Chancellor) on Dec 14, 2010 at 13:53 UTC | |
|
Re^5: Undefined subroutine &main::copy called
by marto (Cardinal) on Dec 14, 2010 at 13:57 UTC |