Re: help in perl script

2010-05-18 Thread Chaitanya Yanamadala
hai shawn yes this is what i am looking for.. glob( '~/.bash_history' ) now the query is working. thank you for ur reply Chaitanya On Tue, May 18, 2010 at 8:18 PM, Shawn H Corey wrote: > On 10-05-18 10:27 AM, Chaitanya Yanamadala wrote: > >> ok is it so.. >> thank you so i think i can do one

Re: help in perl script

2010-05-18 Thread Mohan
hi, system command is only used to run the command and check its success based on the exit status. system ( "history ") == 0 or die " failed"; if you want to capture the output of system command use my $OUTPUT=`history`; print $OUTPUT; you can find more details at perldoc -f system -- Re

Re: help in perl script

2010-05-18 Thread Shawn H Corey
On 10-05-18 10:27 AM, Chaitanya Yanamadala wrote: ok is it so.. thank you so i think i can do one thing like open the file ~/.bash_history and then read the file.. actually i am trying this alternative.. but there is some error.. when i give it like open(DAT, "~/.bash_history")or die("Cannot ope

Re: help in perl script

2010-05-18 Thread Chaitanya Yanamadala
e has no history to report. > > Bob McConnell > > -Original Message- > From: Chaitanya Yanamadala [mailto:dr.virus.in...@gmail.com] > Sent: Tuesday, May 18, 2010 10:20 AM > To: Bob McConnell > Cc: beginners@perl.org > Subject: Re: help in perl script > > dear Bob &g

RE: help in perl script

2010-05-18 Thread Bob McConnell
: beginners@perl.org Subject: Re: help in perl script dear Bob if my current shell does not have any history then how come i am getting the history when i run the same in the terminal?? from where i am getting this history. Chaitanya On Tue, May 18, 2010 at 7:03 PM, Bob McConnell wrote

Re: help in perl script

2010-05-18 Thread Chaitanya Yanamadala
dear Bob if my current shell does not have any history then how come i am getting the history when i run the same in the terminal?? from where i am getting this history. Chaitanya On Tue, May 18, 2010 at 7:03 PM, Bob McConnell wrote: > From: Chaitanya Yanamadala > > > hai > > both of these

RE: help in perl script

2010-05-18 Thread Bob McConnell
From: Chaitanya Yanamadala > hai > both of these didnt help me.. > > @kammen > i can run the history command from the command line.. > but not through the perl script.. > i have tried ur choice but it also didnt work.. > > @shawn > yes it didnt gave me any out put.. > but i require to print th

Re: help in perl script

2010-05-18 Thread Chaitanya Yanamadala
hai both of these didnt help me.. @kammen i can run the history command from the command line.. but not through the perl script.. i have tried ur choice but it also didnt work.. @shawn yes it didnt gave me any out put.. but i require to print the output.. so hw do i do it.. can some body help

Re: help in perl script

2010-05-18 Thread Shawn H Corey
On 10-05-18 08:51 AM, Chaitanya Yanamadala wrote: Can't exec "history": No such file or directory at cmd.pl line 33, line 1. -- so what could be wrong i am running this under the cent os 5.4 and the perl version is 5.8.8 "history" is a built-in shell command for bas

help in perl script

2010-05-18 Thread Chaitanya Yanamadala
hai i am quite new to perl. i know php and mysql. so i require some help from u guys i have written one small script to run the short commands this is the code -- Code -- #!/usr/bin/perl use warnings; # CUSTOM SYSTEM COMMANDS print "Please