[11360] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4960 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 26 11:19:42 1999

Date: Fri, 26 Feb 99 08:13:20 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 26 Feb 1999     Volume: 8 Number: 4960

Today's topics:
        Array question. <iblake@kodak.com>
    Re: Array question. (Sam Holden)
    Re: Array question. <earlw@kodak.com>
    Re: Array question. (Bart Lateur)
        Authenticating to a proxy <donfield@quik.com>
    Re: automatic converters of perl4 to perl5 (I R A Aggie)
    Re: automatic converters of perl4 to perl5 (Bart Lateur)
    Re: automatic converters of perl4 to perl5 (Randal L. Schwartz)
    Re: automatic converters of perl4 to perl5 <uri@ibnets.com>
    Re: automatic converters of perl4 to perl5 (Bart Lateur)
    Re: automatic converters of perl4 to perl5 (Bart Lateur)
    Re: automatic converters of perl4 to perl5 <uri@ibnets.com>
    Re: automatic converters of perl4 to perl5 (Ronald J Kimball)
        automatic server startup <andreas.appelbaum@sap-ag.de>
    Re: Background script I/O (Tad McClellan)
    Re: Background script I/O (David Efflandt)
    Re: beginners question <Philip.Newton@datenrevision.de>
    Re: Binary of DMAKE - followup dturley@pobox.com
    Re: Binary of DMAKE - more dturley@pobox.com
        Binary of DMAKE <khowe@performance-net.com>
    Re: Binary of DMAKE dturley@pobox.com
        Broken Pipe <avi@uplanet.com>
    Re: Broken Pipe (Ronald J Kimball)
    Re: BUG?? method invocation syntax and _require_ strang <rick.delaney@home.com>
        Calc dates with mods in perl?? smithj@statenislandonline.com
    Re: Calc dates with mods in perl?? (Collin Rogowski)
    Re: Calc dates with mods in perl?? (Ronald J Kimball)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 24 Feb 1999 20:16:12 GMT
From: "Ian Blake" <iblake@kodak.com>
Subject: Array question.
Message-Id: <01be6032$b1c128d0$3282dd96@ko-gipd-w8gnlg7>

I hope it's not too simple, and that I am posting to the proper group. I
just want to clear all elements from an array. If I use @arrayname="" then
it appears that it sets the first element to null instead of having no
elements at all. Hope I'm not being too cryptic. Thanks.

Ian Blake
iblake@kodak.com


------------------------------

Date: 24 Feb 1999 20:17:51 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Array question.
Message-Id: <slrn7d8njf.a3p.sholden@pgrad.cs.usyd.edu.au>

On 24 Feb 1999 20:16:12 GMT, Ian Blake <iblake@kodak.com> wrote:
>I just want to clear all elements from an array. 

@array=();


-- 
Sam

 "... the whole documentation is not unreasonably transportable in a
 student's briefcase." - John Lions describing UNIX 6th Edition
 "This has since been fixed in recent versions." - Kernighan & Pike


------------------------------

Date: Wed, 24 Feb 1999 15:30:38 -0500
From: Earl Westerlund <earlw@kodak.com>
Subject: Re: Array question.
Message-Id: <36D4616E.31B3@kodak.com>

Ian Blake wrote:
> 
> I hope it's not too simple, and that I am posting to the proper group. I
> just want to clear all elements from an array. If I use @arrayname="" then
> it appears that it sets the first element to null instead of having no
> elements at all. Hope I'm not being too cryptic. Thanks.
> 
> Ian Blake
> iblake@kodak.com

Try @arrayname=();
-- 
+-----------------+----------------------------------------+
| Earl Westerlund | Kodak's Homepage: http://www.kodak.com |
+-----------------+----------------------------------------+
|  The opinions expressed herein are mine and mine alone   |
|     (most people don't seem to want them anyway)         |
+----------------------------------------------------------+


------------------------------

Date: Thu, 25 Feb 1999 09:28:12 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Array question.
Message-Id: <36d71758.4344567@news.skynet.be>

Ian Blake wrote:

>I hope it's not too simple, and that I am posting to the proper group. I
>just want to clear all elements from an array.

Right newsgroup alright.

>If I use @arrayname="" then
>it appears that it sets the first element to null instead of having no
>elements at all.

Yes, because it's equivalent to 

	@arrayname = ("");

Use either of:

	@arrayname = ();

	undef @arrayname;

	Bart.


------------------------------

Date: Fri, 26 Feb 1999 02:19:54 GMT
From: "Don Stanfield" <donfield@quik.com>
Subject: Authenticating to a proxy
Message-Id: <exnB2.1511$Sf6.5391522@newsfeed.intelenet.net>

Does anyone have any recommendations/examples on authenticating to a proxy
with Perl 5?  I need to fetch an HTML document from the Internet, but I have
to get outside the corporate firewall.

Thanks,

DWS




------------------------------

Date: 22 Feb 1999 20:51:44 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: automatic converters of perl4 to perl5
Message-Id: <slrn7d3gvp.lv4.fl_aggie@enso.coaps.fsu.edu>

On Mon, 22 Feb 1999 17:33:15 GMT, Bart Lateur <bart.lateur@skynet.be> wrote:

+ Randal L. Schwartz wrote:

+ >Be sure to run "perl -cw yourproggy" though, and fix up anything
+ >it complains about.  There's no way an automatic program can do that,
+ >or Perl would have done it anyway. :)

+ 	"In string, @thing now must be written as \@thing"

+ This looks like this could be automated.

Not reliably, IMHO. For instance:

print "@a\n"; and  @a=(1..5);
                   print "@a\n";

produce different things as stand-alone snippets. How would an automated
converter know, intuitively, that it should change the fist instance to
print "\@a\n"; and leave the second instance untouched?

It would have to scan the entire program before making the determination,
and it would have to know all of the ways one can stuff a value into
a list. As Randal sez, this isn't a trivial thing, or the interpreter
would do it for you automagically.

James




------------------------------

Date: Mon, 22 Feb 1999 17:33:15 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: automatic converters of perl4 to perl5
Message-Id: <36d489eb.2690336@news.skynet.be>

Randal L. Schwartz wrote:

>Be sure to run "perl -cw yourproggy" though, and fix up anything
>it complains about.  There's no way an automatic program can do that,
>or Perl would have done it anyway. :)

	"In string, @thing now must be written as \@thing"

This looks like this could be automated.

	Bart.


------------------------------

Date: 22 Feb 1999 12:50:49 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: automatic converters of perl4 to perl5
Message-Id: <m17ltatb6e.fsf@halfdome.holdit.com>

>>>>> "Bart" == Bart Lateur <bart.lateur@skynet.be> writes:

Bart> Randal L. Schwartz wrote:
>> Be sure to run "perl -cw yourproggy" though, and fix up anything
>> it complains about.  There's no way an automatic program can do that,
>> or Perl would have done it anyway. :)

Bart> 	"In string, @thing now must be written as \@thing"

Bart> This looks like this could be automated.

Nope.  Consider the following:

	sub foo { print "hey @there"; }
	@there = (1..5); &foo();

That will give the fatal error described above, but we really want to
leave @there alone.

So, it can't be mechanical.  Sorry.

@there = qw(Just another Perl hacker,); print "@there";

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


------------------------------

Date: 22 Feb 1999 16:29:32 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: automatic converters of perl4 to perl5
Message-Id: <39aey6unyb.fsf@ibnets.com>

>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:

  BL> Randal L. Schwartz wrote:
  >> Be sure to run "perl -cw yourproggy" though, and fix up anything
  >> it complains about.  There's no way an automatic program can do that,
  >> or Perl would have done it anyway. :)

  BL> 	"In string, @thing now must be written as \@thing"

  BL> This looks like this could be automated.

not really. it is a runtime vs. compile time issue. perl5 needs to know
at compile time that it is an array. perl4 checked at runtime in the
interpolation of the string. if it was an array it was interpolated,
else it left in the literl @. that can't be automated as perl5 at
compile time can't tell if the @array will ever be created.

uri

-- 
Uri Guttman                             Hacking Perl for Ironbridge Networks
uri@sysarch.com				uri@ironbridgenetworks.com	


------------------------------

Date: Mon, 22 Feb 1999 22:57:22 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: automatic converters of perl4 to perl5
Message-Id: <36dde039.7009967@news.skynet.be>

Randal L. Schwartz wrote:

>Nope.  Consider the following:
>
>	sub foo { print "hey @there"; }
>	@there = (1..5); &foo();
>
>That will give the fatal error described above, but we really want to
>leave @there alone.

In a way, you're right. But, you said it: "fatal error".

It should have stayed as it is, if only the error wasn't fatal. And I
don't think that Perl4 would have "done the right thing" for this case,
either.

	Bart.


------------------------------

Date: Mon, 22 Feb 1999 23:02:47 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: automatic converters of perl4 to perl5
Message-Id: <36dee0ef.7191824@news.skynet.be>

Uri Guttman wrote:

> that can't be automated as perl5 at
>compile time can't tell if the @array will ever be created.

But I don't think the Perl 5 compiler currently works "properly" for the
example Randal has given.

I think that the "fatal error" should have been postponed until after
the *complete* source has been compiled (in the "semantic phase"), and
not "not found in the source compiled so far", as it seems to do right
now. Only if the array isn't found at all (and literal evals don't
count), the error may be given.

	Bart.


------------------------------

Date: 22 Feb 1999 19:06:29 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: automatic converters of perl4 to perl5
Message-Id: <3990dqq8ze.fsf@ibnets.com>

>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:

  BL> Randal L. Schwartz wrote:
  >> Nope.  Consider the following:
  >> 
  >> sub foo { print "hey @there"; } @there = (1..5); &foo();
  >> 
  >> That will give the fatal error described above, but we really want
  >> to leave @there alone.

  BL> In a way, you're right. But, you said it: "fatal error".

  BL> It should have stayed as it is, if only the error wasn't
  BL> fatal. And I don't think that Perl4 would have "done the right
  BL> thing" for this case, either.

perl4 would have interpolated @there into the print string. that is the
"right" thing for perl4 to do. the variable existed at the runtime call
of foo so it gets interpolated. perl5 needs to know at compile time of
the print string itself. it allows a array variable inside a string only 
if it has been declared before the use in compile time. if the above
code had the assignment before the sub definition it would work in
perl5.

the big change is as i said, runtime vs. compile time determination if
an array get interpolated or not.

uri

-- 
Uri Guttman                             Hacking Perl for Ironbridge Networks
uri@sysarch.com				uri@ironbridgenetworks.com	


------------------------------

Date: Mon, 22 Feb 1999 23:46:38 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: automatic converters of perl4 to perl5
Message-Id: <1dnngkg.vh9t6ua9hk6gN@bay1-200.quincy.ziplink.net>

Bart Lateur <bart.lateur@skynet.be> wrote:

> Uri Guttman wrote:
> 
> > that can't be automated as perl5 at
> >compile time can't tell if the @array will ever be created.
> 
> But I don't think the Perl 5 compiler currently works "properly" for the
> example Randal has given.
> 
> I think that the "fatal error" should have been postponed until after
> the *complete* source has been compiled (in the "semantic phase"), and
> not "not found in the source compiled so far", as it seems to do right
> now. Only if the array isn't found at all (and literal evals don't
> count), the error may be given.

I believe that in some future version of Perl, the fatal error will be
removed, and @foo in a double-quotish string will *always* interpolate
the array @foo.  The fatal error is used in order to force programmers
to note the change in behavior.

Anyway, I think it's much easier for the programmer to mention the array
ahead of time, than for the compiler to keep track of all the @name's in
double-quotish strings.

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


------------------------------

Date: Fri, 26 Feb 1999 14:49:07 -0000
From: "Andreas Appelbaum" <andreas.appelbaum@sap-ag.de>
Subject: automatic server startup
Message-Id: <7b6caq$phu$1@mailusr.wdf.sap-ag.de>

Hello,
we have a small network running at home for test stuff.
Altogether we have 7 Server which have to be online to be able
to do what we want, but 7 Server online 24h a Day kost lot's of money
(Electr.). So what I think to do is the following:
One 386 with DOS and a Relais Card.
A Program (Perl?)  which is Pinging one System after another and if one
Worstation returns a Ping it will give Power to the Server via the Relais
Card. So only the 386 will be online 24h a Day.
The Server Group can be shutdown from a Intranet Web Page already, but you
still have to boot the stuff yourself.

Any Ideas how to do such a thing, tried several things already but could not
find any Perl command which allows me to analyse the return of a Ping.

Thanks
Andi




------------------------------

Date: Sun, 21 Feb 1999 11:59:52 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Background script I/O
Message-Id: <82epa7.pc1.ln@magna.metronet.com>

Wade T. Funk (wfunk@dev.tivoli.com) wrote:

: In otherwords, how can I put the script in the
: background
: so that I can write to and read from the script?


   Perl FAQ, part 8:

      "How can I open a pipe both to and from a command?"


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: 22 Feb 1999 08:44:55 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Background script I/O
Message-Id: <slrn7d266b.pu.efflandt@efflandt.xnet.com>

On Sat, 20 Feb 1999 22:30:21 -0600, Wade T. Funk <wfunk@dev.tivoli.com> wrote:
>Hi,
>
>I am trying to write a script, ultimately CGI, that will present a GUI
>for a script
>already written.  The script that is already in place and functional is
>a large while
>loop that processes user commands and returns messages after each
>process.
>The user exits the program by typing 'exit'.  I want to create a CGI
>script that
>takes these commands via a GUI and pipes them to the backgrounded script
>
>already mentioned.  In otherwords, how can I put the script in the
>background
>so that I can write to and read from the script?

See 'man perlipc'.

Servers that run in the background often use one or more FIFO's for
communication. A FIFO is a pipe that appears to be and can be used just 
like a regular file with a filename.  Just don't use the -s file test
because it will be zero.  I have one script that forks 2 children to
control stdin, stdout and read current status from stderr of an external
binary that expects to use files for data in and out.  The status is
either displayed on the screen or converted to % to a dialog guage.

-- 
David Efflandt    efflandt@xnet.com
http://www.xnet.com/~efflandt/


------------------------------

Date: Tue, 23 Feb 1999 10:08:11 +0100
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: beginners question
Message-Id: <36D26FFB.9D5332A4@datenrevision.de>

white.tj wrote:
> 
> I am on a sun box running solaris 2.5.
> I wrote a simple script to create two xterm windows and a filemgr window. I
> now the system commands are correct I tested them. So now my problem. When I
> execute the script only one window at a time will come up. When I kill the
> first window the second one will pop up and so on. Why? and is there a
> better way to do this in perl? <script included>
> 
> #!/usr/perl/perl5.004/bin/perl
> 
> system '(xterm -title lpscript -g 75X35+1+1 -e /usr/lpscript)' ;
> system '(xterm -title lpmon -g 75X35-0-0 -e /usr/lpmon)' ;
> system '(/usr/openwin/bin/filemgr -d /var/spool/lp/tmp/hostname)' ;

Try using system 'xterm ... &';  -- the ampersand at the end will tell
the shell to start the process in the background, without waiting.
That's how I usually start X applications from the command line, anyway.

HTH, HAND

Cheers,
Philip


------------------------------

Date: Tue, 23 Feb 1999 15:14:42 GMT
From: dturley@pobox.com
Subject: Re: Binary of DMAKE - followup
Message-Id: <7augkp$edb$1@nnrp1.dejanews.com>

In article <7au8to$7k6$1@nnrp1.dejanews.com>,
  dturley@pobox.com wrote:
>I got mine with the the old GS build of perl and have saved
> it. If you can't find dmake binary, download the GS Perl and grab it.

Well, I couldn't find the binary, so I "zipped" mine up and uploaded it to my
web site.

http://www.binary.net/dturley/dmake.html

--

____________________________________
David Turley

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: Tue, 23 Feb 1999 16:30:50 GMT
From: dturley@pobox.com
Subject: Re: Binary of DMAKE - more
Message-Id: <7aul3q$igh$1@nnrp1.dejanews.com>

In article <7au8to$7k6$1@nnrp1.dejanews.com>,
  I wrote:

> Oh, you want one? I got mine with the the old GS build of perl and have saved
> it. If you can't find dmake binary, download the GS Perl and grab it.

I might be losing my mind, I can't remewber if I posted this followup or not.
:-( I couldn't locate a binary of dmake so I "zipped" up the one distributed
with GS  Perl and made it available here.

http://www.binary.net/dturley/dmake.html
--

____________________________________
David Turley

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: Mon, 22 Feb 1999 16:11:40 -0400
From: "Kevin Howe" <khowe@performance-net.com>
Subject: Binary of DMAKE
Message-Id: <mSiA2.8241$134.73286@tor-nn1.netcom.ca>

Does anyone know if there is a downloadable binary available for DMAKE,
which works with winnt?

Thanks,
Sincerely,
Kevin Howe




------------------------------

Date: Tue, 23 Feb 1999 13:02:52 GMT
From: dturley@pobox.com
Subject: Re: Binary of DMAKE
Message-Id: <7au8to$7k6$1@nnrp1.dejanews.com>

In article <mSiA2.8241$134.73286@tor-nn1.netcom.ca>,
  "Kevin Howe" <khowe@performance-net.com> wrote:
> Does anyone know if there is a downloadable binary available for DMAKE,
> which works with winnt?

yes.

Oh, you want one? I got mine with the the old GS build of perl and have saved
it. If you can't find dmake binary, download the GS Perl and grab it.
--

____________________________________
David Turley

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: Tue, 23 Feb 1999 16:59:23 -0800
From: "Avi Weiss" <avi@uplanet.com>
Subject: Broken Pipe
Message-Id: <7avip1$9qh$1@news.uplanet.com>

All;

Im using Perl5 and trying to read from a pipline of commands:

$cmd = " command 1 |  command2  |";

unless ($pid = open(PPIPE, "$cmd")) {
        HTMLAndExit("Can't log activity","Unable to start log process");
        }

if ($pid) {
        open (LOGFILE, ">/tmp/file1") or HTMLAndExit("Log File Error",
"Can't open\
 log file");
}

while(<PPIPE> && !signaled){
        print LOGFILE $_;
}

Both commands start and pipe is opened successfully. As soon as there is
some output from the commands, main app quits with "broken pipe". Im not
exceeding 10K before reading.

Any ideas why the pipe is breaking?

thanks

-Avi
avi@uplanet.com





------------------------------

Date: Wed, 24 Feb 1999 00:30:19 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Broken Pipe
Message-Id: <1dnpf1b.19zmj721be10l9N@bay1-193.quincy.ziplink.net>

Avi Weiss <avi@uplanet.com> wrote:

> while(<PPIPE> && !signaled){
>         print LOGFILE $_;
> }

perlop:

  Evaluating a filehandle in angle brackets yields the next line from
  that file (newline, if any, included), or undef at end of file.
  Ordinarily you must assign that value to a variable, but there is one
  situation where an automatic assignment happens.  If and ONLY if the
  input symbol is the only thing inside the conditional of a while or
  for(;;) loop, the value is automatically assigned to the variable $_.


Note that 'if and ONLY if'; you're discarding the line of input.

-- 
#!/usr/bin/sh -- chipmunk (aka Ronald J Kimball)
    perl -e'for(sort keys%main::){print if $$_ eq 1}
        ' -s  -- -' Just' -' another ' -'Perl ' -'hacker
' http://www.ziplink.net/~rjk/  [rjk@linguist.dartmouth.edu]


------------------------------

Date: Sun, 21 Feb 1999 21:24:39 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: BUG?? method invocation syntax and _require_ strangeness
Message-Id: <36D07B6A.9FDC4F93@home.com>

[posted & mailed]

Thomas E. Wieger wrote:
> 
> Hello all out there!
> 
> Could somebody explain me the following behaviour?
> 
> When i start "Test.pm" i get
> 
>     "Undefined subroutine &B::A called at B.pm line 32."
> 
> When i activate Line 1 and deactivate Line 2, everything works fine.
> Also, if i change the type of method invocation by activating line 3 
> and deactivating line 4, everything works fine.

I think you have that last one backwards.

[snip]

> 
>     #require A;      # Line 1
>     require "A.pm";  # Line 2

[snip]

>         $test    = new A ( 5 );  # Line 3 - This is the line, perl
> doesn't like!!!!
>     #    $test    = A->new( 5 ); # Line 4

Straight from perlmod:

    The two statements:

        require SomeModule;
        require "SomeModule.pm";		

    differ from each other in two ways.  In the first case, any double
    colons in the module name, such as C<Some::Module>, are translated
    into your system's directory separator, usually "/".   The second
    case does not, and would have to be specified literally.  The other 
    difference is that seeing the first C<require> clues in the compiler 
    that uses of indirect object notation involving "SomeModule", as in 
    C<$ob = purge SomeModule>, are method calls, not function calls.  
    (Yes, this really can make a difference.)

This last bit should probably be in perlfunc's 'require' entry, but
there is no bug in the behaviour.  As you have seen, it really _can_
make a difference.

-- 
Rick Delaney
rick.delaney@home.com


------------------------------

Date: Mon, 22 Feb 1999 15:28:54 GMT
From: smithj@statenislandonline.com
Subject: Calc dates with mods in perl??
Message-Id: <7art3a$5fn$1@nnrp1.dejanews.com>

Calc dates with mods in perl??

Can this be done I am trying to take a date and add 10 to it?


Please email back smithj@statenislandonline.com


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: Mon, 22 Feb 1999 15:55:37 GMT
From: collin@rogowski.de (Collin Rogowski)
Subject: Re: Calc dates with mods in perl??
Message-Id: <36d17d59.3657547415@news.uni-X.net>

On Mon, 22 Feb 1999 15:28:54 GMT, smithj@statenislandonline.com wrote:

What do you mean by 10? 10 Days?

If you want to calculate Dates, get the Module Manip::Date (I think).
Otherwise, you are on ten safe side if you convert the date to
unix-time (seconds since 1.1.1970). Than add 10*24*60*60 (10 Days in
Seconds). Then reconvert to your format again. This can be done using
the functions gmtime, timegm (or localtime, timelocal if you don't
want to use GMT).

hope this helps,

Collin Rogowski

>Calc dates with mods in perl??
>
>Can this be done I am trying to take a date and add 10 to it?
>
>
>Please email back smithj@statenislandonline.com
>
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    



------------------------------

Date: Mon, 22 Feb 1999 23:46:39 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Calc dates with mods in perl??
Message-Id: <1dnngox.1b9431i2kohvkN@bay1-200.quincy.ziplink.net>

<smithj@statenislandonline.com> wrote:

> Calc dates with mods in perl??

Perl module Date::Calc??

Get thee to CPAN:  http://www.perl.com/CPAN/

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
            perl -le 'print "Just another \u$^X hacker"'


------------------------------

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 4960
**************************************

home help back first fref pref prev next nref lref last post