The Perl command opens a new instance of the shell, not the one you called Perl from. The new instance 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 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 <r...@cbord.com> wrote: 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 the output.. > so hw do i do it.. > > can some body help me on this.. Not until you learn a little more about Unix shells. Your command worked perfectly, it just didn't output what you expected. The history command in bash returnes the command history of the current shell. Since you just opened it via the system call, it has no history, so it returns an empty string. That behavior is correct. Now, what are you actually looking for? Bob McConnell -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/