jet speed wrote:
Hi Chaps,
I need bit more help with this, i slightly modified the code based on the
inputs, still having the same issue of $_ substitution.
Appreciate your help with this.
##################################################
#!/usr/bin/perl
use strict;
use warnings;
my $base = "/usr/openv/netbackup/logs";
my @dirs = qw(bpcd bprd admin bpdbjobs bpsched nbdb user_ops bpbackup bpdbm
bptm nbpushdata vmd bpbkar bphdb db_log tlhcd vnetd bpbrm bpjobd tlhd );
foreach my $dir1 (@dirs) {
my @new= "$base/$dir1 \n";
foreach (@new){
system qq[(/usr/bin/find "$_" -mtime 3 -exec ls -l '{}' \\\;)]
}
}
for my $dir ( @dirs ){
my $new = "$base/$dir"; # no newline
system qq[/usr/bin/find "$new" -mtime 3 -exec ls -l {} \\\;];
}
####################################################
error output
/usr/bin/find: stat() error /usr/openv/netbackup/logs/bpcd
: No such file or directory
/usr/bin/find: stat() error /usr/openv/netbackup/logs/bprd
: No such file or directory
#########################################################
Kindly let me know why this error.
Don't include the newline in the string.
Regds
Js
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
I like Perl; it's the only language where you can bless your
thingy.
Eliminate software piracy: use only FLOSS.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/