forget trying to buffer in a file - just assign the backtick output to a list.

@d = `dir`;
print join "\n",@d;



"Murugavel Chidambaram" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

03/04/2005 12:56 AM

       
        To:        "Satish.Waghmare" <[EMAIL PROTECTED]>
        cc:        [EMAIL PROTECTED], [email protected]
        Subject:        Re: To Run System Command



Hi,

Try this way,

my $my_dir = 'home/your_dir';

`cd $your_dir`;
`dir *.txt /b > a.dat`;


Regards

C.M





[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
03/04/2005 03:43 PM

       To:     [EMAIL PROTECTED]
       cc:     [email protected]
       Subject:        To Run System Command


Hi :

I'm using ActiveState PERL 5.8 on Windows Platform.

I want to know about How to run a DOS command through a PERL script.
I want to run a below DOS commmand and then read the result from the file
it has created.
Command--     dir *.txt /b > a.dat
Kindly please help me.
Thank You
Regards
~Satish

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to