Hi All,
Is there
a way in perl to pass arguments by value? Normally it’s treating every
arguments to be pass as a reference…
Thank
you…
Joseph C. Bautista
Senior Engineer OSS
Future Communication Company International, Kuwait
Mobile : +965
9394038
Email A
[EMAIL PROTECTED] wrote:
> my $next_day=localtime(time+(60*60*24));
> print "tomorrow is $next_day\n";
...
> mine uses the built-ins time() and localtime()
>
> time() returns seconds since 1/1/1970 (epoch) and localtime() gives you a
> human readable date.
>
> what i do is seed localtime with
$Bill Luebkert wrote:
> sekhar kavuru wrote:
>
>
>>I need help with a generic function that can give the value of next day
>>Example : 12/31/2005 => 01/01/2006
>>
>>I want to accomplish this without Cal::Date
>
>
> use strict;
> use warnings;
> use Time::Local;
>
> my @t = localtime;
[EMAIL PROTECTED] wrote on 12/09/2005 02:31:03
PM:
> Date: Fri, 09 Dec 2005 11:26:20 -0800
> From: "$Bill Luebkert" <[EMAIL PROTECTED]>
> Subject: Re: Perl code to get next date Example : 12/31/2005 =>
>01/01/2006
> To: sekhar kavuru <[EMAIL PROTECTED]>
> Cc: activeperl@listserv.activestate.c
From: Wagner, David --- Senior Programmer Analyst --- WGO
>
> [EMAIL PROTECTED] wrote:
> > From: sekhar kavuru [mailto:[EMAIL PROTECTED]
> >>
> >> I need help with a generic function that can give the value of next
> >> day Example : 12/31/2005 => 01/01/2006
> >>
> >> I want to accomplish this w
sekhar kavuru wrote:
> I need help with a generic function that can give the value of next day
> Example : 12/31/2005 => 01/01/2006
>
> I want to accomplish this without Cal::Date
use strict;
use warnings;
use Time::Local;
my @t = localtime; # get epoch time for today
$t[0
[EMAIL PROTECTED] wrote:
> From: sekhar kavuru [mailto:[EMAIL PROTECTED]
>>
>> I need help with a generic function that can give the value of next
>> day Example : 12/31/2005 => 01/01/2006
>>
>> I want to accomplish this without Cal::Date
Fine, but by using timelocal and localtime together, you
Phil Rafferty <> wrote:
> When a script is executed STDOUT and/or STDERR may be redirected as
> follows:
>
>perl script.pl > log.txt or
>perl script.pl 2> log.txt or
>perl script.pl | taker.pl etc,
>
> and all the other variations.
>
> My question is this:
>
> Can I find out
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of sekhar
kavuru
Sent: 09 December 2005 16:35
To: activeperl@listserv.ActiveState.com
Subject: Perl code to get next date Example : 12/31/2005 => 01/01/2006
> I need help with a generic function that can give the value of next
day
> Examp
From: sekhar kavuru [mailto:[EMAIL PROTECTED]
>
> I need help with a generic function that can give the value of next
> day Example : 12/31/2005 => 01/01/2006
>
> I want to accomplish this without Cal::Date
Are you saying you want to do it without using a date module, or
without using that parti
Here is a clue .. I have not done this, but I understand that
it is possible to run an ioctl on a file descriptor to determine the
nature of the descriptor, such as , is it a tty, or a pipe, or
a file, or what.
On 12/9/05, Phil Rafferty <[EMAIL PROTECTED]> wrote:
> Can I find out
> 1) whether
I need help with a generic function that can give the value of next day Example : 12/31/2005 => 01/01/2006 I want to accomplish this without Cal::Date Thanks Sekhar__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection a
When a script is executed STDOUT and/or STDERR may
be redirected
as follows:
perl script.pl > log.txt or
perl script.pl 2> log.txt or
perl script.pl | taker.pl etc,
and all the other variations.
My question is this:
Can I find out
1) whether redirection has been specified?
Sandeep Deshpande:
> I would also welcome if somebody can tell me, where this information
> is stored in Windows Registry then I can write a script to go the
> said location and get the information or If there is any URL which
> explains Registry structure in detail?
Do not peek in the registry,
Try this:
use Win32;
my $name = Win32::NodeName();
my $domain = Win32::DomainName();
my $filesystem = scalar Win32::FsType();
my $architecture = Win32::GetArchName();
my $cpu = Win32::GetChipName();
my $os = Win32::GetOSName();
my ($servicepack, $major, $minor, $build, $id) = Win32::GetOSVersio
Sandeep Deshpande <> wrote:
> Dear All,
> If I wanted to understand the OS then I used to use simply 'print $^O'
> (which tell MSWin32, it was enough to understand that the OS is
> Windows). It used to work okay, but now one of my scripts need to
> understand the windows OS in detail. (i.e. if the
> I would also welcome if somebody can tell me, where this
> information is stored in Windows Registry
For WinNT and onwards it's here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
And
CSDVersion = Service Pack
CurrentBuildNumber = build number
CurrentVersion = version number
For the Registry Key, try:
//HKLM/software/microsoft/Windows NT/CurrentVersion/. The various keys in
their should tell you all you need to know
> -Original Message-
> From: Sandeep Deshpande [mailto:[EMAIL PROTECTED]
> Sent: 09 December 2005 11:42
> To: activeperl@listserv.ActiveState.c
Dear All,
If I wanted to understand the OS then I used to use simply 'print $^O'
(which tell MSWin32, it was enough to understand that the OS is Windows). It
used to work okay, but now one of my scripts need to understand the windows
OS in detail. (i.e. if the OS is Windows 2000 or Windows XP or Wi
19 matches
Mail list logo