Passing arguments by value

2005-12-09 Thread Joseph C. Bautista
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

Re: Perl code to get next date Example : 12/31/2005 => 01/01/2006

2005-12-09 Thread $Bill Luebkert
[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

Re: Perl code to get next date Example : 12/31/2005 => 01/01/2006

2005-12-09 Thread $Bill Luebkert
$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;

Re: Perl code to get next date Example : 12/31/2005 => 01/01/2006

2005-12-09 Thread JPerlmutter
[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

RE: Perl code to get next date Example : 12/31/2005 => 01/01/200 6

2005-12-09 Thread Bowie Bailey
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

Re: Perl code to get next date Example : 12/31/2005 => 01/01/2006

2005-12-09 Thread $Bill Luebkert
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

RE: Perl code to get next date Example : 12/31/2005 => 01/01/200 6

2005-12-09 Thread 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 without Cal::Date Fine, but by using timelocal and localtime together, you

RE: STDERR and redirection

2005-12-09 Thread Brian Raven
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

RE: Perl code to get next date Example : 12/31/2005 => 01/01/2006

2005-12-09 Thread Brian Raven
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

RE: Perl code to get next date Example : 12/31/2005 => 01/01/200 6

2005-12-09 Thread Bowie Bailey
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

Re: STDERR and redirection

2005-12-09 Thread David Nicol
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

Perl code to get next date Example : 12/31/2005 => 01/01/2006

2005-12-09 Thread sekhar kavuru
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

STDERR and redirection

2005-12-09 Thread Phil Rafferty
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?

Re: Windows OS version

2005-12-09 Thread Dr.Ruud
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,

RE: Windows OS version

2005-12-09 Thread Armin Geyer
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

RE: Windows OS version

2005-12-09 Thread Brian Raven
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

RE: Windows OS version

2005-12-09 Thread Steve.Malbon
> 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

RE: Windows OS version

2005-12-09 Thread Ramlakhan, Dave
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

Windows OS version

2005-12-09 Thread Sandeep Deshpande
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