finddata has asked for the wisdom of the Perl Monks concerning the following question:
the above print $new_name fails to print the statement .if ( ( -d $name ) && ( exists $name_map->{$name} ) ) { #print $name; my $new_name = $name_map->{$name}; # print $new_name; rename_file_or_dir( $name, $new_name ); $name = $new_name; #print $name; } elsif ( -f $name ) { if (( my $base_name = $name) =~ s/\.config$// ) { if ( $name_map->{$base_name} ) { my $new_name = $name_map->{$base_name} . '.config' +; # print $new_name; rename_file_or_dir( $name, $new_name ); change_file( $mapfile, $name_map, $regex ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: following if condition fails to print its variable using perl?
by hippo (Archbishop) on Mar 15, 2017 at 09:16 UTC | |
|
Re: following if condition fails to print its variable using perl?
by stevieb (Canon) on Mar 15, 2017 at 04:32 UTC | |
|