On Thu, Apr 1, 2010 at 5:58 PM, Shawn H Corey <shawnhco...@gmail.com> wrote:

> 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
>
>
Thanks for you help with his, cheers Shawn !!!

Reply via email to