galacticos has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl $y_date= `date --date="yesterday"`; $y_date =~ s/IST//g; $y_date =~ m/(\d+)$/; $year= $1; print $year; $y_date =~ m/^(\w+\s\w+\s\w+)/; #print $y_date; $day=$1; print $day; open(FH,"C:\\arerror.log") or die "Unable to open logfile:$!\n"; open(OUT,">C:\\output.log") or die "Unable to open output file:$!\n"; @fileco=<FH>; @grepLogs = grep(/$day(.*)$year/,@fileco ); print OUT @grepLogs;
Actuall in windows this programme is working fine But at the same time When I am trying this programme in windows it's not working and one more thing when i exectue my perl script in windows it's got stuck in cmd but after that when i prees enetr two or three time it will throw thius error " the system cannot" only these three word please check this if it's possible ...
Thanks and regards
Galacticos
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: My script is working fine on linux but it's not working on the Windows
by marto (Cardinal) on Nov 17, 2011 at 09:54 UTC | |
by galacticos (Initiate) on Nov 17, 2011 at 10:01 UTC | |
by Corion (Patriarch) on Nov 17, 2011 at 10:03 UTC | |
by marto (Cardinal) on Nov 17, 2011 at 10:16 UTC | |
| |
by marto (Cardinal) on Nov 17, 2011 at 10:28 UTC | |
| |
| |
Re: My script is working fine on linux but it's not working on the Windows
by sundialsvc4 (Abbot) on Nov 17, 2011 at 13:51 UTC | |
Re: My script is working fine on linux but it's not working on the Windows
by Anonymous Monk on Nov 18, 2011 at 00:01 UTC |
Back to
Seekers of Perl Wisdom