Windows-Command line Arguments
Windows-Command line Arguments
am 13.06.2007 16:36:17 von raj esh
--===============1578088038==
Content-Type: multipart/alternative; boundary="0-594115816-1181745377=:8663"
Content-Transfer-Encoding: 7bit
--0-594115816-1181745377=:8663
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Dear Guru's,
=20
Here is my sample script...which i am running on windows.
=20
use strict;
use warnings;
=20
my $result =3D system ( "date");
=20
Now Date command returns me one more command prompt on which i have to =
enter current date(means need to enter another command) how do i enter on=
e more command.
=20
Please help me gurus.=20
=20
Is their any module which can help me ??=20
=20
I have checked perldoc -q system, perldoc -q command. These are little =
confusing . I will surely recheck these if the answer lies with in these.
=20
Correct me if i am not clear on mentioned my problem.
=20
Thanks,
Raj.
=20
---------------------------------
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Gam=
es.
--0-594115816-1181745377=:8663
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Dear Guru's,
Here is my sample script=
....which i am running on windows.
use stri=
ct;
use warnings;
my $result =3D=
system ( "date");
Now Date command return=
s me one more command prompt on which i have to enter current date(means =
need to enter another command) how do i enter one more command.
iv> Please help me gurus.
iv>Is their any module which can help me ??
> I have checked perldoc -q system, perldoc -q command. T=
hese are little confusing . I will surely recheck these if the answer lie=
s with in these.
Correct me if i am not cl=
ear on mentioned my problem.
Thanks,
=
Raj.
Be a PS3 game guru.
Get your game face on with
"http://us.rd.yahoo.com/evt=3D49936/*http://videogames.yahoo .com">the lat=
est PS3 news and previews at Yahoo! Games.
--0-594115816-1181745377=:8663--
--===============1578088038==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1578088038==--
Re: Windows-Command line Arguments
am 13.06.2007 17:19:03 von Bill Luebkert
raj esh wrote:
> Dear Guru's,
>
> Here is my sample script...which i am running on windows.
>
> use strict;
> use warnings;
>
> my $result = system ( "date");
>
> Now Date command returns me one more command prompt on which i have to
> enter current date(means need to enter another command) how do i enter
> one more command.
>
> Please help me gurus.
>
> Is their any module which can help me ??
>
> I have checked perldoc -q system, perldoc -q command. These are little
> confusing . I will surely recheck these if the answer lies with in these.
>
> Correct me if i am not clear on mentioned my problem.
Do you want to get the date or set the date ?
use time, localtime, gmtime or Win32::API (GetSystemTime) for getting the
date depending on what you need. To get with your system call above, add
the /T switch and use backticks to get returned date:
my $result = `cmd /C date /T`;
print "result=$result\n";
Setting the time using shell out:
my $new_time_str fmt = '00:01:02';
system "cmd /C time $new_time_str";
Setting date would be similar.
Or you can set using Win32::API SetSystemTime call.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Windows-Command line Arguments
am 14.06.2007 14:53:02 von raj esh
--===============1639281932==
Content-Type: multipart/alternative; boundary="0-1763248565-1181825582=:44223"
Content-Transfer-Encoding: 7bit
--0-1763248565-1181825582=:44223
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Dear Guru's,
=20
I want to set the date of the system. The problem got solved by usiong =
the following method.
=20
#####
use strict;
use warnings;
my $result =3D system ("date < newdate.txt");
#####
In newdate.txt i entered my own date.
=20
I used Win32::API module in another perl code. It was very helpfull ind=
eed. The replies gave me more knowledge and the correct way of approach i=
n solving the problem. I am very thankful to every one.=20
=20
Thanks and Regards,
Raj.
=20
---------------------------------
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
--0-1763248565-1181825582=:44223
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Dear Guru's,
I want to set the d=
ate of the system. The problem got solved by usiong the following me=
thod.
#####
use strict;
=
use warnings;
my $result =3D system ("date < newdate=
..txt");
#####
In newdate.txt i entered my own dat=
e.
I used Win32::API module in another per=
l code. It was very helpfull indeed. The replies gave me more k=
nowledge and the correct way of approach in solving the problem=
.. I am very thankful to every one.
Thanks=
and Regards,
Raj.
We won't tell. Get more on
/evt=3D49980/*http://tv.yahoo.com/collections/265
">shows you hate to love
(and love to hate):
rd.yahoo.com/evt=3D49980/*http://tv.yahoo.com/collections/26 5
">Yahoo! TV's Guilty Pleasures list.
--0-1763248565-1181825582=:44223--
--===============1639281932==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1639281932==--
Re: Windows-Command line Arguments
am 15.06.2007 00:47:50 von Bill Luebkert
raj esh wrote:
> Dear Guru's,
>
> I want to set the date of the system. The problem got solved by usiong
> the following method.
>
> #####
> use strict;
> use warnings;
> my $result = system ("date < newdate.txt");
You don't need a file, you can just pass it on the commandline:
system "date 06-14-07";
> #####
> In newdate.txt i entered my own date.
>
> I used Win32::API module in another perl code. It was very helpfull
> indeed. The replies gave me more knowledge and the correct way of
> approach in solving the problem. I am very thankful to every one.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs