[11709] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5309 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 6 11:06:43 1999

Date: Tue, 6 Apr 99 08:00:21 -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           Tue, 6 Apr 1999     Volume: 8 Number: 5309

Today's topics:
        "chmod g+s" and $0 Problem <edelbi@ndh.net>
    Re: array question (Abigail)
    Re: can't open file from script (I R A Aggie)
    Re: can't open file from script <tom.kralidis@ccrsDotnrcandOtgc.ca>
    Re: CGI.pm - Doesn't recognize consecutive white spaces (I R A Aggie)
    Re: CGI.pm - Doesn't recognize consecutive white spaces (Bill Moseley)
    Re: CGI.pm - Doesn't recognize consecutive white spaces (Tad McClellan)
    Re: chmod - setting permissions with perl? <fuchin@mail.nwos.lucent.com>
    Re: chmod - setting permissions with perl? <tom.kralidis@ccrsDotnrcandOtgc.ca>
    Re: Does anyone know whats wrong with my script? (Tad McClellan)
        dynamic includes <xxx@hotmail.com>
        Elegant parsing of HTML title and metatags? <nmorison@ozemail.com.au>
    Re: First CGI/Perl  Program (I R A Aggie)
    Re: flocking question - worried (Bill Moseley)
    Re: here docs vs qq quote operator. Just personal prefe (Abigail)
    Re: here docs vs qq quote operator. Just personal prefe (Abigail)
    Re: How can i install modules on ActivePerl? (Bill Moseley)
    Re: How do I turn this 1000000 into this 1,000,000 in P (Bill Moseley)
    Re: How to check for benchmark speed of a program? (Tad McClellan)
        How to handle a ctrl-C interupt ? <janssen@caos.kun.nl>
        How to prevent Ctrl-C from <STDIN>? <fuchin@mail.nwos.lucent.com>
        I can't use alarm :( <Fernando.Ariel.Gont@p10.f3.gonzo.circuit.com>
    Re: Is Perl the right tool for the job (I R A Aggie)
        Multi search engine search on NT erdavis@my-dejanews.com
        PERL 5.0 IIS NT - problems <webmaster@inei.com.br>
    Re: Perl Question for generating HTML (Tad McClellan)
        Q: array ref prototype in module (Dan Halbert)
    Re: Regexp question (Tad McClellan)
    Re: Script to run ftp (I R A Aggie)
    Re: Very large regular expressions (Sean McAfee)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Tue, 06 Apr 1999 16:44:17 +0200
From: Nabil Edelbi <edelbi@ndh.net>
Subject: "chmod g+s" and $0 Problem
Message-Id: <370A1DC1.C32F661F@ndh.net>

I got the following Problem: Just look at the following 5 Steps...

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

[world:/home/ne] (root) : perl -v

This is perl, version 5.004_04 built for sun4-solaris

Copyright 1987-1997, Larry Wall

Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5.0 source
kit.
[world:/home/ne] (root) : cat x.pl
#!/usr/local/bin/perl

print "$0\n";
[world:/home/ne] (root) : ./x.pl
 ./x.pl
[world:/home/ne] (root) : chmod g+s x.pl
[world:/home/ne] (root) : ./x.pl
/dev/fd/4

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

i.e. when I change the SETUID flag of the skript the perl variable $0
gives the name of a device file but not the skript-name as usual!!

Maybe a bug?


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

Date: 6 Apr 1999 14:42:20 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: array question
Message-Id: <7ed6gc$cn8$3@client2.news.psi.net>

Dmitry Epstein (mitiaNOSPAM@nwu.edu) wrote on MMXLIV September MCMXCIII
in <URL:news:370e912c.52975414@news.acns.nwu.edu>:
[] On Tue, 23 Mar 1999 10:55:15 -0500, Ala Qumsieh <aqumsieh@matrox.com>
[] wrote:
[] >
[] >Mark P. wrote:
[] >> $file_extension =~ /\.(.*)$/is;
[] >
[] >1) The /i isn't needed.
[] >2) The /s isn't needed.
[] >3) Your match is greedy.
[] >4) You assign the extension to $1, but never use $1.
[] 
[] $file_extention = /\..*?$/; # (Assuming that $_ is the file name)
[] 
[] $file_extention = /\.[^\/]*?$/; # (Assuming that $_ may contain
[]                                 # a path (e.g. /foo.ext/bar)


Both ?'s are superfluous. /\..*?$/ will match from the *first* period
it finds [1]. If you want to match from the last, use:

     /\.[^.]*$/

Or use split, or rindex/substr.



[1] perl -wle '$_ = "foo.bar.baz"; /\..*?$/; print $&'
    .bar.baz



Abigail
-- 
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'


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

Date: 6 Apr 1999 13:52:41 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: can't open file from script
Message-Id: <slrn7gk4i6.m3o.fl_aggie@stat.fsu.edu>

On Tue, 06 Apr 1999 15:38:28 +0200, Kamran <kamrani@ifi.uio.no> wrote:

+ sorry if this sounds elementary or misappropriate.
+ I need to open a file for writing on a disk mounted on my workstation
+ from inside a perl script. While I can write a file on the disk
+ manually,
+ I fail to do that from the script. I have checked the user id and it
+ is ok. Do I have to set additional property bit on the script ?

What is the failure message? are you using open in the following manner?

open(HANDLE,"somefile.name") or die "Couldn't open somefile.name: $!";

James


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

Date: Tue, 06 Apr 1999 10:12:42 -0400
From: Tom Kralidis <tom.kralidis@ccrsDotnrcandOtgc.ca>
Subject: Re: can't open file from script
Message-Id: <370A165A.3EDD8F34@ccrsDotnrcandOtgc.ca>

Check that your permissions are in tact ie that you can write to the
file.

You can try to write to the file in Perl with a system call:

eg. to write to a file called 'tmp.txt from an ls command

system("ls -l >> tmp.txt");

Hope this helps

 ..Tom

Kamran wrote:
> 
> Hi
> 
> sorry if this sounds elementary or misappropriate.
> I need to open a file for writing on a disk mounted on my workstation
> from inside a perl script. While I can write a file on the disk
> manually,
> I fail to do that from the script. I have checked the user id and it
> is ok. Do I have to set additional property bit on the script ?
> 
> Thanks in advance
> 
> Kamran


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

Date: 6 Apr 1999 13:54:55 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: CGI.pm - Doesn't recognize consecutive white spaces
Message-Id: <slrn7gk4mc.m3o.fl_aggie@stat.fsu.edu>

On Tue, 06 Apr 1999 07:24:35 GMT, rajesh_bhave@my-dejanews.com
<rajesh_bhave@my-dejanews.com> wrote:

+ CGI.pm doesn't recognize consecutive white spaces; this is why I don't get
+ consecutive spaces on the HTML generated by the CGI script. Any way to get
+ these spaces in HTML. Your help is highly appreciated.

Have you done a 'view source'? did you know that HTML renderers don't
observe whitespace, and require a "special character" to force that
behaviour on them? do you know what that tag is?

James


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

Date: Tue, 6 Apr 1999 07:00:38 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: CGI.pm - Doesn't recognize consecutive white spaces
Message-Id: <MPG.1173b361c30c465c989712@206.184.139.132>

In article <7eccre$bpv$1@nnrp1.dejanews.com>, rajesh_bhave@my-
dejanews.com says...
> CGI.pm doesn't recognize consecutive white spaces; this is why I don't get
> consecutive spaces on the HTML generated by the CGI script. Any way to get
> these spaces in HTML. Your help is highly appreciated.

This has nothing to do with CGI.pm.

You might want to read the HTML spec.  Use &nbsp, or probably better, 
tables.  But read http://www.w3.org/TR/REC-html32.html.
-- 
Bill Moseley mailto:moseley@best.com


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

Date: Tue, 6 Apr 1999 05:17:58 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: CGI.pm - Doesn't recognize consecutive white spaces
Message-Id: <6gjce7.fs.ln@magna.metronet.com>

rajesh_bhave@my-dejanews.com wrote:

: CGI.pm doesn't recognize consecutive white spaces; this is why I don't get
: consecutive spaces on the HTML generated by the CGI script. 


   No it isn't.


: Any way to get
: these spaces in HTML.


   This is the Perl newsgroup.

   Perl questions are discussed here.

   HTML questions are discussed in the newsgroup for
   discussing HTML questions:

      comp.infosystems.www.authoring.html


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


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

Date: Tue, 06 Apr 1999 10:19:13 -0400
From: Fu Chin Liu <fuchin@mail.nwos.lucent.com>
Subject: Re: chmod - setting permissions with perl?
Message-Id: <370A17E1.9AC2D091@mail.nwos.lucent.com>

Is the effective user id of this running process the same as the owner
of that file?
It might be the problem?

Tim Lotz wrote:

> hi,
>
> i'm trying to change the permissions from a file in my www-directory
> from 0600 to 0755.
> i tired the following script (plus thousand different scripts):
>
> chmod(0755, '../test.jpg');
> print "done";
>
> it doesn't work.
> does anybody knows why?
> my book says, that this is the way to do it. does it lie:)?
>
> thanx for your help.
>
> sunny greetings from hamburg!
> tim



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

Date: Tue, 06 Apr 1999 10:16:57 -0400
From: Tom Kralidis <tom.kralidis@ccrsDotnrcandOtgc.ca>
Subject: Re: chmod - setting permissions with perl?
Message-Id: <370A1759.98445EAD@ccrsDotnrcandOtgc.ca>

You can try 

system("chmod 755 ../test/jpg");

File permissions, AFAIK, are 3 digits (owner, group, public)

Hope this helps

 ..Tom
--------------------------------------------------------------------------------------------
Tom Kralidis				      			Canada Centre for Remote Sensing
Geo-Spatial Technologist		      			588 Booth Street , Room 241 
User Systems Development Section	      			Ottawa , Ontario K1A 0Y7
Data Acquisition Division		      			Tel: (613) 947-1828
mailto:tom.kralidis@ccrs.nrcan.gc.ca    			Fax: (613) 947-1408
	              
                              http://www.ccrs.nrcan.gc.ca
--------------------------------------------------------------------------------------------

Tim Lotz wrote:
> 
> hi,
> 
> i'm trying to change the permissions from a file in my www-directory
> from 0600 to 0755.
> i tired the following script (plus thousand different scripts):
> 
> chmod(0755, '../test.jpg');
> print "done";
> 
> it doesn't work.
> does anybody knows why?
> my book says, that this is the way to do it. does it lie:)?
> 
> thanx for your help.
> 
> sunny greetings from hamburg!
> tim


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

Date: Tue, 6 Apr 1999 05:00:42 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Does anyone know whats wrong with my script?
Message-Id: <qfice7.fs.ln@magna.metronet.com>

Larry Rosler (lr@hpl.hp.com) wrote:
: In article <7ebo87$dak$1@news1.Radix.Net> on 6 Apr 1999 01:32:55 GMT, 
: Africa Ritter <revjack@radix.net >says...
: > In tin, this thread looks like:
: > 
: > 3 + Does anyone know whats wrong with my Larry Rosler <lr@hpl.hp.com>

: I assume 'tin' is a newsreader (though yours is identified in the 
: headers as BLARG).  I have no idea what the problem might be.


   tin lists threads in columns, Subject followed by From.

   It truncates the Subject to fit in the column.

   Serendipity strikes when it truncates in the "right" place.


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


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

Date: Tue, 06 Apr 1999 10:29:44 -0300
From: Chris <xxx@hotmail.com>
Subject: dynamic includes
Message-Id: <370A0C48.6DAC6816@hotmail.com>

Hi there,
I've tried this with ASP but run into a brick wall so I thought I'd try
the Perl route (which I know little about).
What I'd like to do is have a central web page which dynamically
includes a text file as part of the code.  By dynamic I mean that I
would like to pass this central page a parameter and have the included
text file depend on that parameter.
The problem I ran into with ASP is that the 'include' statement is
parsed before anything else, thus I can't include a variable in that
statement.
Is there a solution to this with Perl? If somebody could point me in the
right direction it would be much appreciated.
Thanks,
Chris



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

Date: Wed, 07 Apr 1999 00:53:45 +1000
From: Neale Morison <nmorison@ozemail.com.au>
Subject: Elegant parsing of HTML title and metatags?
Message-Id: <370A1FF9.553D4371@ozemail.com.au>

I'd appreciate any help. I'm new to regexs and I'm looking for the most
elegant and efficient syntax.
I'm trying to parse out the title and metatags from an HTML file.
The following is my partial solution but it has serious flaws:
- it's inelegant - for example, I don't think I should have to
explicitly set $_ and use an if statement with the match.
- it doesn't work - it only extracts the last metatag, and I want to get
them all
- it may be memory inefficient and slow for large files - do I have to
read the whole file into memory, or is there a cute way of doing this
reading line by line?
- I have heard that using $1 and $2 has an overhead and ideally I'd like
to avoid that



$filename = "test1.html";
open FILE, $filename ;
local $pagetext;
local $metatags;

while (<FILE>) { $pagetext .= $_ }
close FILE;
$_ = $pagetext;
if (m{.*<TITLE>(.*)</TITLE>.*}si) { # parse out the title
 $title = $1;
 $title =~ s/\n//;
}
if (m{^.*<META NAME\s*=\s*\"(.*)\"\s*CONTENT\s*=\s*\"(.*)\"\s*>.*$}si) {
# parse out the metatags
 $metatags{$1} = $2;
}

print $title;
while(($key,$val) = each(%metatags))
{
 print "$key: $val\n";
}





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

Date: 6 Apr 1999 13:57:57 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: First CGI/Perl  Program
Message-Id: <slrn7gk4s2.m3o.fl_aggie@stat.fsu.edu>

On Tue, 06 Apr 1999 02:32:33 GMT, Darren Greer <drgreer@qtiworld.com> wrote:

+ -->I get 'No such file or directory'.

+ You have not set the file to be executable.  Do a 'chmod 755
+ filename'.  Then try again,

Bzzzt. Try it:

> touch a
> ./a
> ./a: Permission denied.

James


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

Date: Tue, 6 Apr 1999 07:05:10 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: flocking question - worried
Message-Id: <MPG.1173b46d3c16a087989713@206.184.139.132>

In article <3709cc2e.0@glitch.nildram.co.uk>, c-denman@dircon.co.uk 
says...
> The flocking side of things is not a problem, I am just worried what happens
> when a file is locked and the server crashes before the file is unlocked.
> 
> Will this file be forever locked, making that file not accessible -
> effectively 'crashing' the whole file incrementing proceedure?

You would have to show us your perl code to know for sure.  Your file 
will be unlocked for you most likely.  The real problem is that your 
counter just won't be accurate from that point forward.  Well, and before 
that, too, probably.  I think Randal Schwartz has posted some good web 
counters based on the more accurate rand() function.



-- 
Bill Moseley mailto:moseley@best.com


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

Date: 6 Apr 1999 14:30:14 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: here docs vs qq quote operator. Just personal preference?
Message-Id: <7ed5pm$cn8$1@client2.news.psi.net>

Ronald J Kimball (rjk@linguist.dartmouth.edu) wrote on MMXLIV September
MCMXCIII in <URL:news:1dptbjo.14mnm271pz7rzwN@[207.60.170.55]>:
__ David Delikat <ddelikat@protix.com> wrote:
__ 
__ >Abigail wrote:
__ > > 
__ > <snip>
__ > >Abigail
__ > >--
__ > >perl -wleprint -eqq-@{[ -eqw\\\\- -eJust -eanother -ePerl -eHacker -e\\\\-]}-
__ > 
__ > OK, what's up Abigail, that one didn't work.  I just copy and paste
__ > in another X session and it gives me lots of perl errors.
__ 
__ Too many backslashes again.  Abigail seems to have a bad habit of creating
__ clever JAPHs, then posting them without testing the final edits.
__ 
__ Either that or Abigail has a really weird shell.  :)
__ 
__ perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-


No, it was a translation from having the JAPH in a string to having the
JAPH in a here document.



Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


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

Date: 6 Apr 1999 14:32:33 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: here docs vs qq quote operator. Just personal preference?
Message-Id: <7ed5u1$cn8$2@client2.news.psi.net>

Jerome O'Neil (jeromeo@atrieva.com) wrote on MMXLIII September MCMXCIII
in <URL:news:37093A97.3A16AD55@atrieva.com>:
\\ Sean McAfee wrote:
\\ 
\\ > Early in my Perl career I went through a phase when I religiously used
\\ > double quotes only when interpolation made them necessary.  It didn't last
\\ > long, because it was really irritating switching quote types whenever I
\\ > needed to add an interpolated variable or escape sequence to a single-quoted
\\ > string, or remove the last interpolated variable or escape sequence from
\\ > a double-quoted string.  To avoid this hassle, I tend to use double quotes
\\ > everywhere.
\\ 
\\ This is why quote and quote-like metacharacters are a Good Thing.  It's
\\ much easier to change q{foo} to qq{$foo} than the similar change using
\\ single and double quotes.  You might find the "Gory Details of Parsing
\\ Quoted Constructs" in perlop interesting reading.


Nah.  It's as easy to change q{$foo} to qq{$foo} as it is to change
"$foo" to q "$foo", or '$foo' to qq '$foo'.



Abigail
-- 
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-


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

Date: Tue, 6 Apr 1999 07:14:13 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: How can i install modules on ActivePerl?
Message-Id: <MPG.1173b68df021ab28989715@206.184.139.132>

In article <7ecov5$ko0$1@nnrp1.dejanews.com>, agniora@usa.net says...
> I am running ActivePerl on a Windows NT platform. Does anyone know how i can
> add external modules to my perl. i dont have any C++ and i dont have enough
> hdd space for it either. Does that mean ill have to live without external
> modules??

Have you tried running 'ppm -h'?  ActiveState provides some of the more 
common modules.


-- 
Bill Moseley mailto:moseley@best.com


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

Date: Tue, 6 Apr 1999 07:10:02 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: How do I turn this 1000000 into this 1,000,000 in Perl?
Message-Id: <MPG.1173b598ee4e2e1989714@206.184.139.132>

In article <VwaO2.187$xI5.7172@typhoon.nycap.rr.com>, indexfinger@usa.net 
says...
> How do I turn this 1000000 into this 1,000,000 in Perl?

perlfaq5.pod
  How can I output my numbers with commas added?



> 
> 
> 
> 
> --
> ==================================================
> SuggestSite - http://www.suggestsite.com
> Word of mouth is the most powerful marketing tool.
> 
> 
> 

-- 
Bill Moseley mailto:moseley@best.com


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

Date: Tue, 6 Apr 1999 05:16:06 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to check for benchmark speed of a program?
Message-Id: <mcjce7.fs.ln@magna.metronet.com>

agniora@usa.net wrote:
: Subject: How to check for benchmark speed of a program?
                            ^^^^^^^^^

   What happened when you did a word search for that in the
   standard perl docs that are on your hard disk?

   You should make some minimal effort to answer your question
   locally before posting it to tens of thousands of computers...


: If i want to check how long it takes to do a certain task for a program, how
: can i do it? 


   Knowing how long it took is not generally useful.

   Knowing how long it takes for alternatives that accomplish
   the same thing allows you to do something useful
   (use the faster one)


: eg to test the total time taken of the following program :  $_ =
: 'This is a text';  print tr/ //;


------------------------
#!/usr/bin/perl -w
use strict;

use Benchmark;

timethese 1_000_000, {
       control => '$_ = q(This is a text)',
       tr      => '$_ = q(This is a text); tr/ //',
       s       => '$_ = q(This is a text); s/ //g'
       };
------------------------

Benchmark: timing 1000000 iterations of control, s, tr...
   control:  2 wallclock secs ( 1.52 usr +  0.00 sys =  1.52 CPU)
         s:  8 wallclock secs ( 8.08 usr +  0.00 sys =  8.08 CPU)
        tr:  3 wallclock secs ( 3.03 usr +  0.00 sys =  3.03 CPU)


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


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

Date: Tue, 06 Apr 1999 16:32:55 +0200
From: Wim Janssen <janssen@caos.kun.nl>
Subject: How to handle a ctrl-C interupt ?
Message-Id: <370A1B17.C6F1A85F@caos.kun.nl>

Lectori Salutem,

How do I handle an interupt like ctrl-C in a perl-script.
  In the program a temporary file is opened.
  When the program is normally ended this file is removed.
  But if the user types a ctrl-C the excecution is stopped
  and that temporary file is not removed.
Thanks for your help !!!
                                                                  Wim

-
-----------------------------------------------------------------------
 University of Nijmegen     Phone: +31(0)24-3653387    *  Wim Janssen  *
 department:  CAOS/CAMM     Fax:   +31(0)24-3652977    -----------------
 Toernooiveld 1             E-mail: janssen@caos.kun.nl
 6525 ED  Nijmegen          URL:    http://www.caos.kun.nl
 -----------------------------------------------------------------------





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

Date: Tue, 06 Apr 1999 10:22:13 -0400
From: Fu Chin Liu <fuchin@mail.nwos.lucent.com>
Subject: How to prevent Ctrl-C from <STDIN>?
Message-Id: <370A1895.FC7F74E5@mail.nwos.lucent.com>

Hi, how can we prevent users from using CTRL-C to quit perl program when
it is
waiting for users' input from <STDIN>?



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

Date: Tue, 06 Apr 99 04:24:31 -0700
From: Fernando Ariel Gont <Fernando.Ariel.Gont@p10.f3.gonzo.circuit.com>
Subject: I can't use alarm :(
Message-Id: <3802095721@p10.f3.n346.z1.ftn>



Hola All , llego la alegria!! :D

I wanted to use alarm to timeout a function. I tried to make a little
script to "test" it, but I got an error message... :(

Here's the script:

/* (ALARM.PL)
#! /local/bin/perl

use strict;

$SIG{'ALRM'}= \&mi_alarma;
alarm(10);

sub mi_alarma{
        print "Recibm una se1al de alarma!\n";
}
        */


And here's the error message I got:

The Unsupported function alarm function is unimplemented at alarm.pl line 6.


What's wrong?

Read U!
Fernando Ariel Gont

e-mail:   fgont@hotpop.com
Web site: http://members.xoom.com/gont/


* Gont's Tagliner *
"Tenemos la inmensa fortuna de hallarnos vivos en dos momentos cruciales de
 la historia. Cuando nos estamos acercando a la solucisn del comienzo de la
 vida en la Tierra, y cuando estamos considerando la posibilidad de la vida
 en otros mundos. Poder abordar ambos problemas constituye un triunfo
 extraordinario, y anuncia el comienzo de una edad de exploraciones y
 descubrimientos jamas soqada"
- Dr. Carl Sagan -



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

Date: 6 Apr 1999 14:03:49 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Is Perl the right tool for the job
Message-Id: <slrn7gk572.m3o.fl_aggie@stat.fsu.edu>

On Tue, 06 Apr 1999 09:41:32 -0400, William Sanns <wsanns@pog.ufl.edu> wrote:

+ client work, but there are many instances where I would just like to
+ present the user with a "report" from the database in html format (I
+ would have used ASP in my "previous life").  From what I've seen, Perl
+ looks like its easy to pick up, but is it capable of creating a "dynamic
+ length" html page (the page would have anywhere from 0 to n number of
+ records returned to the user based on their selections).

perl is typically taken to stand for

Practical
Extraction and
Report
Language

You make the call... :)

As long as n isn't an obscenely huge number, and you don't insist upon
having all those records in memory at once, you should be
fine. Personally, I'd let the database handle the hard work, and
process each record individually.

James


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

Date: Tue, 06 Apr 1999 14:36:13 GMT
From: erdavis@my-dejanews.com
Subject: Multi search engine search on NT
Message-Id: <7ed64t$vfm$1@nnrp1.dejanews.com>

I know how to search multiple sites using unix and perl scripts, but how do
you go about doing the same thing on NT?  I know that this is a bonehead
question, but if I don't ask, I'll spend a lot of time trying to find the
answer.

Any help is greatly appreciated.  If you could email me direct, that would be
even better.  Thank you for your help in advance.

-Eric
iname@websphere.org

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


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

Date: Tue, 6 Apr 1999 10:47:46 -0300
From: "Mardel Cardoso" <webmaster@inei.com.br>
Subject: PERL 5.0 IIS NT - problems
Message-Id: <370a1140.0@news.tba.com.br>

My friends,

Simple Problems in the NT! Does anybody help me?
------------------------------------------------------------------------

I am trying install the Perl 4 in the NT Server with IIS 4.0.

I used the "install.cmd" and every registry is OK!

I put the perl in the directory c:\inetpub\wwwroot\cgi-perl and
created a virtual directory \cgi-bin. Both has permissions to execute.

In the IIS, in "Default Web Site", "Application Setting" I created a
configuration
 .pl        c:\inetpub\wwwroot\cgi-perl\execperl.bat. My objetive is execute
every
programs using the file directives "execperl.bat". In the execperl.bat has:

@echo off
perl %PATH_INFO%,%QUERY_STRING%"
exit

When I use the internet Explorer and execute a program "teste.pl" in the
cgi-bin I had received the messages:

"HTTP Error 403
403.1 Forbidden: Execute Access Forbidden
This error can be caused if you try to execute a CGI, ISAPI, or other
executable program from a directory that does not allow programs to be
executed."

I put the permissions in the directory cgi-perl and cgi-bin.
What's wrong? Must I put other permissions in other directory?

Does Anybody works with NT and IIS?

Mardel
guia@tba.com.br





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

Date: Tue, 6 Apr 1999 04:57:08 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl Question for generating HTML
Message-Id: <49ice7.fs.ln@magna.metronet.com>

trimbleman@hotmail.com wrote:

: >    That is not a Perl question.
: >    There is another newsgroup for discussing HTML:
: >-   comp.infosystems.www.authoring.html

: thanks..i will cross post there..


   Don't do that.

   You should crosspost when your article is on-topic for
   *all* of the crossposted newsgroups.

   HTML stuff is not on-topic for clp.misc, and so should not
   be posted here at all.

   Perl stuff in not on-topic for ciwah, and so should not
   be posted there at all.

   Post HTML questions to the HTML newsgroup.

   Post Perl questions to the Perl newsgroup.

   Post CGI questions to the CGI newsgroup.

   Simple (provided you can figure out what "kind" of question
           you have)


: >    But if whitespace in HTML does matter, I'm still fairly
: >    certain you can get what you want without formats.
: > : >    print() with a here-doc is handy for outputting a block
                          ^^^^^^^^
                          ^^^^^^^^

: >    here-docs are just another form of quoting like single/double quotes.
: >    Go read about it if you want to know about it.
: Where do i go to read about it ??


   In the standard Perl docs that are already installed on your
   hard drive.

   That is why I was careful to spell it in such a way that
   you would find it when you looked for it.

   You aren't going to find it if you don't look though  :-)


grep here-doc *.pod

or, if you are on an impoverished system without grep:

perl -ne 'print "$ARGV: $_" if /here-doc/' *.pod

perldata.pod:A line-oriented form of quoting is based on the shell "here-doc"
perldiag.pod:If you're getting this error from a here-document, you may have 
perldiag.pod:wish to use an empty line as the terminator of the here-document.


   Looks like perldata.pod talks about here-docs...


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


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

Date: Tue, 06 Apr 1999 14:41:47 GMT
From: halbert@bbn.com (Dan Halbert)
Subject: Q: array ref prototype in module
Message-Id: <halbert.923409256@siu>

This is perl 5.005_02.

I'm getting an unexpected compile error complaining about an array vs.
ref arg mismatch on a routine imported from a module, but not on a
similar routine not in a module. I'm puzzled; It looks OK to me.

Thanks a lot,
Dan Halbert


test.pl:
==============================================================================
#!/usr/local/bin/perl -w

use strict;
use MyModule;

my @a = ();

f(\@a);   # defined in MyModule
g(\@a);   # defined here

sub g(\@) { }
==============================================================================

MyModule.pm:
==============================================================================
package MyModule;

require Exporter;
@ISA =	  qw(Exporter);
@EXPORT = qw(f);

use strict;

sub f(\@) { }
==============================================================================
% ./test.pl
Type of arg 1 to MyModule::f must be array (not reference constructor) at ./test.pl line 10, near "@a)"
Execution of ./test.pl aborted due to compilation errors.


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

Date: Tue, 6 Apr 1999 05:27:35 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Regexp question
Message-Id: <72kce7.o11.ln@magna.metronet.com>

stefan@consilia.aland.fi wrote:

: I need to parse as string to see if it contains a sentence starting with
: @@ and then ends with @@ and if so I need to remove those @@'s and store
: the string between the @@'s in a variable.


   my $str = $1 if s/@@(.*?)@@/$1/;


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


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

Date: 6 Apr 1999 14:08:44 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Script to run ftp
Message-Id: <slrn7gk5g9.m3o.fl_aggie@stat.fsu.edu>

On Mon, 5 Apr 1999 21:18:55 -0700, R. Riley <rileyr@u.washington.edu> wrote:

+ Does anyone have any perl scripts to run ftp (for downloading multiple
+ files) on unix? Thanks.

Anon ftp? if so, then LWP will do a fine job:

> lwp-download ftp://some.site.here/some/path/here/somefile.name

James


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

Date: Tue, 06 Apr 1999 14:43:11 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: Very large regular expressions
Message-Id: <34pO2.1486$9Y5.7330487@news.itd.umich.edu>

In article <1dptfb9.c8z3plq56ggkN@[207.60.170.55]>,
Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote:
>Sean McAfee <mcafee@waits.facilities.med.umich.edu> wrote:
>> In article <1dpnz0b.1uuzc3f1od83jaN@p95.block1.tc5.state.ma.tiac.net>,
>> Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote:
>> >>         $letter = $';

>> >Isn't this just another way of doing scalar(m//g)?

>> No, because I'm matching against a different regex each time through the
>> loop.

>So?  Isn't that just another way of doing scalar(m//g)?

>There is no inherent requirement in using m//g that the regex has to be
>the same every time.

Hmmm.  Hadn't considered that.  Nifty.  Thanks!

Now if I can only figure what effect, if any, the \G assertion has.

foreach $regex (@regex) {
    $letter =~ /$regex/g or die;
    #  The above line seems to work exactly the same if I say:
    #  $letter =~ /\G$regex/g or die;
    $i = 0; $hash{ $keys[$n++] } = $$i while defined ${++$i};
}

-- 
Sean McAfee                                                mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl 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 5309
**************************************

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