in reply to Re: Length of String
in thread Length of String
my ($function, $sourcedir, $targetdir) = @ARGV; die ": missing operand. Usage: $0 <OPTION>... <SOURCE_DIRECTORY>... [T +ARGET_DIRECTORY]... OPTION all the FILE(s) and DIRECTORIES: -c = copy or -cy = copy overwrite -m = move or -my = move with overwrite -d = delete \n" unless (defined $function && defined $sourcedir); #@ARGV; #check validity input opendir(my $source_handle, $sourcedir) or die "Can't opendir $sourcedi +r: $!\n"; my $overwrite = 0 + (length $function>2) && $function =~ m/..y/ ; #strip last character ($overwrite now instantiated; no need for 'y') chop($function);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Length of String
by haukex (Archbishop) on Dec 30, 2019 at 18:54 UTC | |
by bigal_george (Acolyte) on Dec 30, 2019 at 20:29 UTC |