[7002] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 629 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 18 05:17:15 1997

Date: Wed, 18 Jun 97 02:03:17 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 18 Jun 1997     Volume: 8 Number: 629

Today's topics:
     Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
     s{search}{replace}; <--So, where is the doc for this on <zenin@best.com>
     Re: s{search}{replace}; <--So, where is the doc for thi <zenin@best.com>
     Re: Tie and Multidimensional hashes (and other stuff) Steve_Kilbane@cegelecproj.co.uk
     Troubles with perl scripts (Edison Montes X)
     Re: Troubles with perl scripts <rootbeer@teleport.com>
     Re: Un-taint a variable how? (Tung-chiang Yang)
     Re: Un-taint a variable how? <rootbeer@teleport.com>
     unwanted \n's in file with wrapped lines <Will Sexton>" <sextw@ils.unc.edu>
     Re: URL worthy strings in Perl <rootbeer@teleport.com>
     Re: Using Date::Manip (Abigail)
     w-command <lauri@samoilu.net>
     Re: what would cause an eval to halt the entir program? <ajohnson@gpu.srv.ualberta.ca>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 15 Jun 1997 15:34:40 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <5o122g$aqu$1@info.uah.edu>

Following is a summary of articles spanning a 7 day period,
beginning at 07 Jun 1997 09:22:53 GMT and ending at
14 Jun 1997 06:16:11 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" e-mail address and name.
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Find the NewsScan junkyard at http://www.cs.uah.edu/~gbacon/clpm/

Excluded Posters
================

perlfaq-suggestions@mox.perl.com

Totals
======

Total number of posters:  461
Total number of articles: 952 (305 with cutlined signatures)
Total number of threads:  373
Total volume generated:   1537.3 kb
    - headers:    624.5 kb
    - bodies:     842.5 kb (584.1 kb original)
    - signatures: 68.1 kb (1365 lines)

Averages
========

Number of posts per poster: 2.1
Number of posts per thread: 2.6
Message size: 1653.6 bytes
    - header:     671.7 bytes
    - body:       906.3 bytes (628.3 bytes original)
    - signature:  73.3 bytes (1.4 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   53    79.9 ( 43.1/ 36.7/ 25.4)  Tom Phoenix <rootbeer@teleport.com>
   27    51.8 ( 16.1/ 35.7/ 18.3)  Tad McClellan <tadmc@flash.net>
   25    44.2 ( 23.2/ 15.6/  9.2)  abigail@fnx.com
   22    41.0 ( 13.0/ 21.1/ 14.1)  mike@stok.co.uk
   15    55.5 ( 10.4/ 42.3/ 34.1)  A. Deckers <deckers@man.ac.uk>
   15    16.7 (  9.4/  6.5/  3.4)  Scott Blanksteen <sibsib@hotmail.com>
   13    19.7 (  7.6/ 12.1/ 10.3)  Nathan V. Patwardhan <nvp@shore.net>
   12    17.5 (  5.7/ 11.5/  6.8)  Andrew M. Langmead <aml@world.std.com>
   12    24.6 (  7.5/ 16.4/ 13.9)  gbacon@cs.uah.edu
   12    14.6 (  6.1/  8.4/  5.7)  Tung-chiang Yang <tcyang@netcom.com>

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  79.9 ( 43.1/ 36.7/ 25.4)     53  Tom Phoenix <rootbeer@teleport.com>
  55.5 ( 10.4/ 42.3/ 34.1)     15  A. Deckers <deckers@man.ac.uk>
  51.8 ( 16.1/ 35.7/ 18.3)     27  Tad McClellan <tadmc@flash.net>
  44.2 ( 23.2/ 15.6/  9.2)     25  abigail@fnx.com
  41.0 ( 13.0/ 21.1/ 14.1)     22  mike@stok.co.uk
  24.6 (  7.5/ 16.4/ 13.9)     12  gbacon@cs.uah.edu
  24.5 (  3.7/  7.1/  4.7)      6  Dean Pentcheff <dean@tbone.biol.sc.edu>
  21.8 (  7.9/  9.9/  5.5)     11  Randal Schwartz <merlyn@stonehenge.com>
  19.7 (  7.6/ 12.1/ 10.3)     13  Nathan V. Patwardhan <nvp@shore.net>
  18.4 (  7.0/ 11.3/  6.9)     10  Douglas Seay <seay@absyss.fr>

Top 10 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   15  Parsing Comma Delemited Text DataBase
   14  Y2K Compliant?
   14  What does "UNIX" stand for..
   13  RFD: comp.lang.perl reorganization
   12  multiple white spaces
   11  perl joke of the day ?
   10  Printing Prime Numbers
    9  converting mode from stat into ls style mode string
    8  how to make a script executable on DOS
    8  Comparing dates.

Top 10 Threads by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Subject
--------------------------  -----  -------

  54.4 (  8.9/ 44.3/ 35.0)     13  RFD: comp.lang.perl reorganization
  29.7 ( 19.3/ 10.0/  6.1)     14  What does "UNIX" stand for..
  29.7 (  9.5/ 18.8/  8.7)     15  Parsing Comma Delemited Text DataBase
  21.8 (  9.0/ 10.9/  6.6)     14  Y2K Compliant?
  19.4 (  7.0/ 11.1/  7.5)     10  Printing Prime Numbers
  18.5 (  2.3/  9.9/  7.3)      4  Windows 3.1 / Perl 4 or 5
  17.5 (  6.1/ 10.0/  6.9)      9  converting mode from stat into ls style mode string
  17.2 (  7.0/  9.7/  6.5)     12  multiple white spaces
  15.8 (  3.3/ 12.5/  6.2)      5  global regex in an "if" statement
  14.6 (  4.2/  9.2/  7.5)      7  XS:Keeping a variable btwn c calls

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      26  comp.lang.perl.modules
      25  comp.lang.perl
      15  comp.lang.javascript
      14  comp.unix.advocacy
      14  comp.sys.amiga.advocacy
      14  comp.object
      14  comp.lang.basic.visual
      14  comp.databases
      14  comp.lang.tcl
      14  comp.os.ms-w

Top 10 Crossposters
===================

Articles  Address
--------  -------

      24  Kaz Kylheku <kaz@vision.crest.nt.com>
      12  anthony_garot@hotmail.com
      12  Ron Natalie <ron@sensor.com>
      12  Jensen <jsjensen@massive.Mines.EDU>
      12  jksun@tiac.net
      12  munck@acm.org
      12  GOKUL CHANDER <gokul@cs.concordia.ca>
      12  av@inorbit.com
      12  Darin Johnson <darin@usa.net.delete_me>
      12  Kevin Schaffer <kxs@mindspring.com>


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

Date: 15 Jun 1997 17:36:05 GMT
From: Byron Brummer <zenin@best.com>
Subject: s{search}{replace}; <--So, where is the doc for this one??? (Was: Re: horrible idea)
Message-Id: <5o1965$su3$2@nntp2.ba.best.com>

Randal Schwartz <merlyn@stonehenge.com> wrote:
> Like, only change "fred" to "barney" the first 10 times?  This'll do
> that:
> 	$count = 0;
> 	s{(fred)}{
> 		if (++$count <= 10) ? "barney" : $1
> 	}ge;
	>snip<

	Ok Randal, so were the heck is this form of s/// delimitor
	documented???  It doesn't seem to be in the v5.004 perlre man page
	(at least a grep for "s{" doesn't find it...).  Is it hiding somewere
	else?  Or do I need to start reading the source again to find the kool
	new perl toys? :-}

-- 
-Zenin
 zenin@best.com


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

Date: 15 Jun 1997 21:42:10 GMT
From: Zenin <zenin@best.com>
Subject: Re: s{search}{replace}; <--So, where is the doc for this one??? (Was: Re: horrible idea)
Message-Id: <5o1nji$514$1@nntp2.ba.best.com>

Jarkko Hietaniemi <jhi@alpha.hut.fi> wrote:
> zenin@best.com:
> > 	Ok Randal, so were the heck is this form of s/// delimitor
> > 	documented???  It doesn't seem to be in the v5.004 perlre man page

> Try perlop, it's there.

	Duh... 'Should have look there... :-D

	Tanks.
-- 
-Zenin
 zenin@best.com


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

Date: 18 Jun 1997 07:36:06 GMT
From: Steve_Kilbane@cegelecproj.co.uk
Subject: Re: Tie and Multidimensional hashes (and other stuff)
Message-Id: <5o8356$jta$1@jupiter.sdd.cegelecproj.co.uk>

In article <33A70B69.2663@ti.com>, Chris Mason <cmason@ti.com> writes:
> This is not very encouraging as things go.  I thought about trying to
> have FETCH return a tied hash like:
> 
> 	sub FETCH {
> 		[...]
> 		[get name of sub hash from server as $1]
>                 tie %rethash, Nethash, $1, $info{'host'}, $info{'port'};
>                 return %rethash;
> 	}

Well, not quite. You'd want to return \%rethash, wouldn't you?

> I read through the source of MLDBM.pm but it seems to pull the whole sub
> hash in from the DBM file and return it.  This would be a bad thing in
> Nethash.

I haven't looked at the module in question, but generally, you're
returning references to lower-level hashes. This means multiple
lookups, but that's ok. You're doing the tieing at the client end,
which means that perl doesn't really have whole hashes kicking
around - it just pretends to.

> 
> 	Second (and lastly), every bit of networking code I can find for perl
> shows a server working by forking a separate process to handle each
> request.

Have a look at Parallel::Pvm - I haven't messed with it myself,
but based on what I've read about PVM, it should give you the
support you need to lob data back and forth across your servers
efficiently. You could even run them on multiple machines. :-)

Note that if you're lobbing data around multiple memory spaces,
you can't just pass hash refs, because they'll only make sense in
their originating memory space (and you can't turn a string back
into a ref). Instead, you'll have to have lookup tables on each side
of a link, generating tags to represent the refs.

steve
-- 
<Steve_Kilbane@cegelecproj.co.uk> - All opinions are mine alone.
Kilbane's law of integration: standardise on protocols and file
formats, and the applications take care of themselves.


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

Date: 14 Jun 1997 15:00:00 GMT
From: edmontes@aguila.dpi.udec.cl (Edison Montes X)
Subject: Troubles with perl scripts
Message-Id: <5nublg$529@news.dpi.udec.cl>

I have a script that got a hit counter.
When I execute it on UNIX it works OK.
When I try to execute it on Netscape, it doesn't and it shows the code.

Well, I've changed the permission with CHMOD 755 visitor.pl, so I think 
it must be executed from Netscape, but it's not.

The perl compiler it's well located at /usr/local/bin/perl

I've seen other perl that executes on Netscape like 
	http://godzilla.EECS.Berkeley.EDU/rolozo

I've made the same things, and he send me the script, but it doesn't work 
here at

	http://aguila.dpi.udec.cl/~edmontes/cgi-bin/visitor.pl
or
	http://www.geocities.com/Paris/LeftBank/6417

Here's the script
------------------------------------------
#!/usr/local/bin/perl
#push(@INC,"..");

$count_file = "rolozo.dat";
$count_file2 = "backup.dat";

open(COUNT,"$count_file");
$count = <COUNT>;
close(COUNT);
open(COUNT2,"$count_file2");
$count2 = <COUNT2>;
close(COUNT2);

if ($count =~ /\n$/) {
   chop($count);}
if ($count2 =~ /\n$/) {
   chop($count2);}

$count++;
$count2++;

open(COUNT,">$count_file");
print COUNT "$count";
close(COUNT);
open(COUNT2,">$count_file2");
print COUNT2 "$count2";
close(COUNT2);

print "Content-type: text/html\n\n";

print <<"html1";
<HTML><BODY bgcolor=\"#FFFFFF\" LINK=\"#000000\" VLINK=\"#777777\">
<CENTER><FONT SIZE=2>Bienvenido
html1

if ($ENV{'REMOTE_USER'} ne "") {
print " $ENV{'REMOTE_USER'}";}
if ($ENV{'REMOTE_HOST'} ne "") {
print " $ENV{'REMOTE_HOST'}";}

print <<"html2";
 .<BR>Han habido $count visitantes a Rolozo Tolkien Espaqol desde Junio 07, 1997.</FONT>
<BR></CENTER></body></html>
html2
-------------------------------------------

Thanks at all




Edison Montes M.
mailto: edison.montes@doctor4u.com
mailto: edmontes@aguila.dpi.udec.cl
http://www.geocities.com/Paris/LeftBank/6417
--------------------------------------------
"Que la luz de Valinor os ilumine"




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

Date: Sun, 15 Jun 1997 16:43:13 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Edison Montes X <edmontes@aguila.dpi.udec.cl>
Subject: Re: Troubles with perl scripts
Message-Id: <Pine.GSO.3.96.970615163535.8945B-100000@kelly.teleport.com>

On 14 Jun 1997, Edison Montes X wrote:

> When I execute it on UNIX it works OK.
> When I try to execute it on Netscape, it doesn't and it shows the code.

When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to
solving such problems. It's available on the perl.com web pages.

   http://www.perl.com/perl/
   http://www.perl.com/perl/faq/
   http://www.perl.com/perl/faq/idiots-guide.html

> open(COUNT,"$count_file");

Not checking for a return value from open is bad.

    open COUNT, $count_file or die "Can't read '$count_file': $!"

> $count =3D <COUNT>;
> close(COUNT);
> open(COUNT2,"$count_file2");
> $count2 =3D <COUNT2>;
> close(COUNT2);

No file locking is bad. And you're still not checking those return values.

> if ($count =3D~ /\n$/) {
>    chop($count);}
> if ($count2 =3D~ /\n$/) {
>    chop($count2);}

That's better done like this.=20

=09chomp $count;
=09chomp $count2;

> $count++;
> $count2++;

Heck, you didn't need to chomp them, since you're incrementing them. Perl
won't worry about a trailing newline.

> open(COUNT,">$count_file");
> print COUNT "$count";
> close(COUNT);
> open(COUNT2,">$count_file2");
> print COUNT2 "$count2";
> close(COUNT2);

I don't know why you have two files, but that's okay. But without locking,
you're going to have a problem as soon as two people request a page at the
same time. That's what file locking is for.

> print "Content-type: text/html\n\n";
>=20
> print <<"html1";
> <HTML><BODY bgcolor=3D\"#FFFFFF\" LINK=3D\"#000000\" VLINK=3D\"#777777\">
> <CENTER><FONT SIZE=3D2>Bienvenido
> html1
>=20
> if ($ENV{'REMOTE_USER'} ne "") {
> print " $ENV{'REMOTE_USER'}";}
> if ($ENV{'REMOTE_HOST'} ne "") {
> print " $ENV{'REMOTE_HOST'}";}

Those could be done more simply by simply inserting them into the text,
since that was double-quote interpolated. That is, they'll only print
something if they're non-empty, so it's simpler that way.

> print <<"html2";
> .<BR>Han habido $count visitantes a Rolozo Tolkien Espa=F1ol desde Junio =
07, 1997.</FONT>
> <BR></CENTER></body></html>
> html2

And you know that that's not true, right? Counters are meaningless. :-)

It might be simpler to download one of the 83 counter scripts that are
already debugged, rather than to write your own. :-)

Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 15 Jun 1997 08:10:13 GMT
From: tcyang@netcom.com (Tung-chiang Yang)
Subject: Re: Un-taint a variable how?
Message-Id: <tcyangEBt5D1.BvD@netcom.com>

Posted and mailed.

Well, our friend asked how to untaint a variable.  Since the only way
I know to untaint a variable is passing through a matching pattern, and
he/she did not mention any other conditions for his/her security
requiements, therefore....

For the counter I used in the FAQ documents I keep, I did not attempt to
check whether the incoming data are bad or not, because

(1) the counter Perl scripts are invoked by SSI, so the user does not know
    where the counter scripts are, and what the filename and paths they use.
    This is the first line of defense (though not a good one, security by
    obscurity).
(2) the counter script reads in the category to count through @ARGV, which
    could be dirty.  However, the counter script also reads in a data file
    for counts like:

       netcom: 325
       iglou: 143
       teleport: 8765
       aol: 12

    then the script increments the category specified by $ARGV[0] and
    prints it (say, it prints 8766 if $ARGV[0] is 'teleport'), or doing
    nothing if $ARGV[0] is not one of the categories ('netcom', 'iglou',
    'teleport', ...., that is, it contains bad data).

Is this scheme safe?  My counter script does not call 'system' or 'eval',
'folk'.

=====================================
Tom Phoenix typed when the mommy tyrannosaurus found him:
: On Thu, 12 Jun 1997, Tung-chiang Yang wrote:

: > Pass it through a matching pattern like ($var = $1 if /(.*)/, though
: > you have to guarantee it is really untainted after that.

: That's a suboptimal way to do it since, as you point out, you have to do
: another test. And besides, your pattern match will allow any bad data to
: get through! The methods in perlsec(1) are better. Hope this helps!

--
========= Try the low-crossposting robomoderated 'alt.culture.taiwan' ===

soc.culture.taiwan, soc.culture.china (by SCC FAQ Team) FAQ's:
   http://www.iglou.com/tcyang/Taiwan_faq.shtml, China_faq.shtml


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

Date: Sun, 15 Jun 1997 11:52:43 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Tung-chiang Yang <tcyang@netcom.com>
Subject: Re: Un-taint a variable how?
Message-Id: <Pine.GSO.3.96.970615113723.21212C-100000@kelly.teleport.com>

On Sun, 15 Jun 1997, Tung-chiang Yang wrote:

> Well, our friend asked how to untaint a variable.  Since the only way
> I know to untaint a variable is passing through a matching pattern, and
> he/she did not mention any other conditions for his/her security
> requiements, therefore....

I guess I wasn't clear enough. What I was trying to say is that it's
better to direct them to perlsec(1) than to give them a way to untaint
absolutely anything without checking. But if you must show how to untaint
and you don't know what restrictions to put on the data, just use a dummy
regexp, like this.

    if ($data =~ /^\s*(some pattern)\s*$/) {
	$data = $1;			# Untainted here
    } else {
	die "Bad data format couldn't be untainted";
	# Or whatever else is appropriate
    }
    # $data is untainted here

> For the counter I used in the FAQ documents I keep, I did not attempt to
> check whether the incoming data are bad or not, because
> 
> (1) the counter Perl scripts are invoked by SSI, so the user does not know
>     where the counter scripts are, and what the filename and paths they use.
>     This is the first line of defense (though not a good one, security by
>     obscurity).

You're right, this isn't a good defense. :-)

> (2) the counter script reads in the category to count through @ARGV, which
>     could be dirty.  However, the counter script also reads in a data file
>     for counts like:
> 
>        netcom: 325
>        iglou: 143
>        teleport: 8765
>        aol: 12
> 
>     then the script increments the category specified by $ARGV[0] and
>     prints it (say, it prints 8766 if $ARGV[0] is 'teleport'), or doing
>     nothing if $ARGV[0] is not one of the categories ('netcom', 'iglou',
>     'teleport', ...., that is, it contains bad data).
> 
> Is this scheme safe?  My counter script does not call 'system' or 'eval',
> 'folk'.

It may be safe; I can't be sure without looking at the script. If you use
globs or backticks you may be at risk. Likewise if you open a file with an
incautiously-untainted filename. Again, perlsec(1) has good information,
and so does the WWW Security FAQ. Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Sat, 14 Jun 1997 14:15:08 -0400
From: "<Will Sexton>" <sextw@ils.unc.edu>
Subject: unwanted \n's in file with wrapped lines
Message-Id: <Pine.SOL.3.96.970614141355.13297C-100000@ruby.ils.unc.edu>

I'm trying to get a perl script to read in a file with some very
long lines.  The problem is, the file wraps some of these long lines so
that perl sees newline characters where there should be none.  Needless to
say, this is messing me up.  So I have a question about how to deal with
this, but I'm not really sure what the question is.  It might be:

Is it possible to store text files with unlimited line lengths?

Or, can I make perl unwrap the text when reading it in, or otherwise
ignore these \n's?

Or, do I just have to make the lines shorter?

Or something else, even.  If you know the answer, or even the question,
please let me know.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Will Sexton			wise2@mindspring.com
UNC-CH/Info Sci			sextw@ils.unc.edu




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

Date: Sun, 15 Jun 1997 07:05:47 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Rudy Richter <rudy@mitec.net>
Subject: Re: URL worthy strings in Perl
Message-Id: <Pine.GSO.3.96.970615070144.10052G-100000@kelly.teleport.com>

On Fri, 13 Jun 1997, Rudy Richter wrote about encoding characters for a
URL:

[ a lot more like this snipped ]
> $URLval =~ s/"/%22/g;
> $URLval =~ s/=/%3D/g;
> $URLval =~ s/\?/%3F/g;
> $URLfilterby =~ s/#/%23/g;
> 
> This sucks, IMHO, and I would love to see something better..

How about using a module to do the job? Clean, efficient, documented, and
already written for you. And the price is right! 

    http://www.perl.com/CPAN/modules/by-category/
	15_World_Wide_Web_HTML_HTTP_CGI/

Look for libwww. Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 18 Jun 1997 05:02:09 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Using Date::Manip
Message-Id: <EByGnL.BCv@nonexistent.com>

Kirk Rogers (kirkr@trant.sp.trw.com) wrote on 1386 September 1993 in
<URL: news:01bc7b73$f7afa470$338c0481@dna>:
++ I loaded Manip into my lib file and all works well.  However, is there a
++ call to Manip which I can store into an array and extract the individual
++ array elements?
++ 
++ but I would like to have:
++ 
++ @date=&ParseDate("today");
++ returning -> @date[0] = 1997, @date[1] = 06, etc.
                ^$               ^$

Quickly browsing through the manual learns: [1]

@date = UnixDate ParseDate ("today"), '%y', '%m', '%d', '%H', '%M', '%S';

should work. A quick test shows that it indeed works.


[1] The line:  @date=&UnixDate($date,@format)
    is in the first 20 lines of the manual.


Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=$]*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: Sat, 14 Jun 1997 17:18:59 +0300
From: Lauri Laakso <lauri@samoilu.net>
Subject: w-command
Message-Id: <33A2A853.4392@samoilu.net>

w command shows like this:

nettipaja:~$ w
  5:17pm  up 44 days,  4:35,  4 users,  load average: 0.00, 0.02, 0.00
User     tty      From              login@  idle   JCPU   PCPU  what
lauri    ttyC7                      2:43pm  2:33                -bash
aqua     ttyC2                      4:32pm    44                -bash
nettipaja:~$

And i want to test if I am in, in other words some line's first 5 
letters equals my name, lauri.

Please email or I may miss it, thanx!

 ...................................................................
  Lauri Laakso  -  Nettipaja  -  GSM: 358+40-588 8889 [EMAIL2GSM]
       http://www.samoilu.net/  -  mailto:lauri@samoilu.net


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

Date: Sat, 14 Jun 1997 03:12:35 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: what would cause an eval to halt the entir program?
Message-Id: <33A25273.766422DC@gpu.srv.ualberta.ca>

Keith Kwiatek wrote:
> 
> For what reasons would this statement cause the
> entire program to halt , without putting anything in
>  the $@..............?
> 
> $myvar = '$secondvar = 10;'
> eval ($myvar);
> print $secondvar;
> 

are you sure the program is actually halting? or
perhaps failing to start running due to some
syntax error? If I try running this, even without
the -w, it says:
syntax error at - line 2, near "eval "
Execution of - aborted due to compilation errors.

hint: if you don't see a syntax error on the line
specified by perl, look up one line, and check it from right
to left paying particular attention to missing or misplaced
quotes and semi-colons (repeat as necessary)...

regards
andrew


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

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


Administrivia:

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 629
*************************************

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