[14026] in Perl-Users-Digest
Perl-Users Digest, Issue: 1436 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 19 18:10:42 1999
Date: Fri, 19 Nov 1999 15:10:27 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <943053026-v9-i1436@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 19 Nov 1999 Volume: 9 Number: 1436
Today's topics:
file empty? <chris@chrismail.connectfree.co.uk>
Re: file empty? (Brett W. McCoy)
Re: file empty? <gellyfish@gellyfish.com>
Re: file empty? (Kragen Sitaker)
Re: File::Find on Win32 :-( - getit4.pl (1/1) <gellyfish@gellyfish.com>
Getting HTML tags via regular expression davidairth@my-deja.com
Re: Help me read my database please (Kragen Sitaker)
Re: Help me read my database please <gellyfish@gellyfish.com>
help need please on perl <mdtaylor@mdtaylor.com>
Re: help need please on perl <gellyfish@gellyfish.com>
Re: help need please on perl <mark.bluemelNOmaSPAM@siemens.co.uk.invalid>
Re: help need please on perl <mattking@techie.com>
Re: Help Uploading Files to Web Site <gellyfish@gellyfish.com>
Re: Help: 501 Protocol error <gellyfish@gellyfish.com>
How do I change the date in script so it adds 8 hours o <andy@ringtone.net>
Re: How do I change the date in script so it adds 8 hou <jeffp@crusoe.net>
Re: How do I get a list of users in an NT domain? <gellyfish@gellyfish.com>
Re: How do I get a list of users in an NT domain? <julien_lauper@my-deja.com>
Re: how to make perl executable <ritchie@fnal.gov>
HTML::Pager crackbaby1@my-deja.com
Re: Is there anyone out there with experience setting u <gellyfish@gellyfish.com>
Re: Is there no length() function? <gellyfish@gellyfish.com>
Re: Is there no length() function? <newsposter@cthulhu.demon.nl>
Re: Is there no length() function? (Abigail)
Re: Is there no length() function? (Abigail)
Re: legal names and about sorting (Abigail)
Re: legal names and about sorting <lr@hpl.hp.com>
Limiting Search Results <info@marinermotel.com>
mktime Returns Unexpected Values <craver@eddy.nos.noaa.gov>
Re: Module for Netware NDS ? <gellyfish@gellyfish.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 19 Nov 1999 19:43:19 -0000
From: "Chris" <chris@chrismail.connectfree.co.uk>
Subject: file empty?
Message-Id: <3835b653.0@news2.cluster1.telinco.net>
How do you find out if a .fil file is empty???
--
Chris
chris@chrismail.connectfree.co.uk
www.bl-soft.com/chrissite
------------------------------
Date: Fri, 19 Nov 1999 20:15:46 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: file empty?
Message-Id: <slrn83bc3q.kd9.bmccoy@moebius.foiservices.com>
Also Sprach Chris <chris@chrismail.connectfree.co.uk>:
>How do you find out if a .fil file is empty???
Perl uses a method similar to that of the bash shell (other shells may use
them also), using the filetest operators. -e tests for the existance of a
file, for istance. In your case, -z tests for a zero-length file. They
are documented in the perlfunc documentation more thoroughly (look at -X
FILENAME in the function listing).
--
Brett W. McCoy bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek) http://www.foiservices.com
FOI Services, Inc./DIOGENES 301-975-0110
---------------------------------------------------------------------------
------------------------------
Date: 19 Nov 1999 21:59:17 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: file empty?
Message-Id: <814h7l$69u$1@gellyfish.btinternet.com>
On Fri, 19 Nov 1999 19:43:19 -0000 Chris wrote:
>
> How do you find out if a .fil file is empty???
read in the perlfunc manpage about -s (under the -X stuff )
if ( -s $file )
{
print "Yup its got some stuff in it \n";
}
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Fri, 19 Nov 1999 22:59:19 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: file empty?
Message-Id: <bDkZ3.28988$YI2.1349209@typ11.nn.bcandid.com>
In article <3835b653.0@news2.cluster1.telinco.net>,
Chris <chris@chrismail.connectfree.co.uk> wrote:
>How do you find out if a .fil file is empty???
What's a .fil file?
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 19 Nov 1999 23:09:17 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: File::Find on Win32 :-( - getit4.pl (1/1)
Message-Id: <814lat$6c1$1@gellyfish.btinternet.com>
On Fri, 19 Nov 1999 00:13:39 GMT John Armsby wrote:
> I have run my script which you have kindly rewritten on windows 98. I
> will try it on my NT machine tomorrow. It works flawlessly.
>
Of course it does - I tested it on some Unix machine ;-}
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Fri, 19 Nov 1999 22:11:11 GMT
From: davidairth@my-deja.com
Subject: Getting HTML tags via regular expression
Message-Id: <814hts$bvf$1@nnrp1.deja.com>
I am trying to parse HTML files and get a list of all of the tags,
pretty simple. I am using regular expressions and just about have it,
but I am still getting:
"<b> blah blah </b> and this too" <---matches to the end of a line
I want just a list of all the open and close tags:
<b> <---match 1
</b> <---match 2
<TR>
<TD>
</TD>
</TR>
basically, the parsing doesn't stop when it hits the second > tag:
I am trying: </?b.+>
Any ideas?
David
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 19 Nov 1999 21:13:02 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Help me read my database please
Message-Id: <y3jZ3.28725$YI2.1333418@typ11.nn.bcandid.com>
In article <8144ec$1i3$1@nnrp1.deja.com>, Surfy <slimy@bigfoot.com> wrote:
>I've figured everything else out, but not
>how to retrieve the record from the database. To give you an idea of
>what I'm looking for... here's what I want the script to do.
>
>1) Open the pipe-delimited database (which already exists) for reading
>2) Look through it until it finds the right record
>3) Stop looking once it's found it (each record has a unique id)
>4) Split the record into individual variables (not an array)
>5) Close the database
Well, which step are you having trouble with?
DBD::CSV might be just the ticket, but I have no experience with it, so I can't say.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 19 Nov 1999 22:48:37 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Help me read my database please
Message-Id: <814k45$6bf$1@gellyfish.btinternet.com>
On Fri, 19 Nov 1999 18:21:06 GMT Surfy wrote:
> Hello,
>
> I've been modifying other people's perl scripts for years but I am now
> faced with a problem and I have to write a small script myself. The
> script must accept a database id number (passed through a form),
> retrieve the record from the flatfile pipe-delimited database
> corresponding to that id number and then print out an html page based
> on the fields in the record.
I would search this group thoroughly on Deja news to find some example code.
Even today people have posted code (albeit flawed) that approximates to
what you want to do. Otherwise I would suggest that you read the Perl
documentation for a description of the functions open, split and print.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Fri, 19 Nov 1999 15:20:10 -0000
From: "Dean Taylor" <mdtaylor@mdtaylor.com>
Subject: help need please on perl
Message-Id: <943024814.22051.0.nnrp-03.d4e45bfc@news.demon.co.uk>
I am new to perl and cgi
all I would like to know is how can I configure my system locally to run and
test my perl scripts-without having to connect every time I want to test
something?
Do i just need to install a Perl Interpreter in any file on my desk top and
use this as an internal cgi bin for testing OFFLINE.(LIKE AN INTERNAL SERVER
ETC.)
Please help my phone bills are sky high testing mi cgi bin live on the
internet all day.
This may be a silly post but I am new to this cgi / perl area
-please be patient !!!!!!!
--
************************
e-mail from:
M D Taylor
mdtaylor@mdtaylor.com
*************************
------------------------------
Date: 19 Nov 1999 15:32:31 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: help need please on perl
Message-Id: <38356d8f_2@newsread3.dircon.co.uk>
Dean Taylor <mdtaylor@mdtaylor.com> wrote:
> I am new to perl and cgi
> all I would like to know is how can I configure my system locally to run and
> test my perl scripts-without having to connect every time I want to test
> something?
>
If you are talking about testing CGI programs then you will eventually
want to install an HTTP server on your local machine - however we dont
discuss these matters here and I would suggest that you ask in the
group that I have set the followups to.
/J\
--
"You look lovely this evening. Have you decreased in mass?" - Alien,
The Simpsons
------------------------------
Date: Fri, 19 Nov 1999 07:53:48 -0800
From: Mark Bluemel <mark.bluemelNOmaSPAM@siemens.co.uk.invalid>
Subject: Re: help need please on perl
Message-Id: <004aa0e3.34f255c4@usw-ex0101-006.remarq.com>
In article <943024814.22051.0.nnrp-03.d4e45bfc@news.demon.co.uk>, "Dean
Taylor" <mdtaylor@mdtaylor.com> wrote:
> I am new to perl and cgi
> all I would like to know is how can I configure my system locally
> to run and
> test my perl scripts-without having to connect every time I want
> to test
> something?
> Do i just need to install a Perl Interpreter in any file on my
> desk top and
> use this as an internal cgi bin for testing OFFLINE.(LIKE AN
> INTERNAL SERVER
> ETC.)
Yes. Download ActivePerl (www.activestate.com) which is the WIN32 port.
Then spend some time reading the docs (html) which come with it, follow
pointers to online resources and probably buy one or more books (the
online resources will give some guidance).
You _must_ use the CGI.pm module for your Perl CGI programs, or you're
likely to have heaps of scorn poured over you. If you do that, your
programs can easily be tested from a DOS prompt - to some degree.
To do more, you should download a webserver (don't ask here which one -
look into the webserver newsgroups - its not Perl!) onto your desktop.
Read, learn and inwardly digest the manuals, websites and FAQs, also
take Jonathan's advice on newsgroup etiquette.
Then if you have trouble come back to _an appropriate newsgroup_ and
ask a sensible question which shows you've done some work yourself - if
you do that, you'll get help. If not - prepare to be roasted.
> Please help my phone bills are sky high testing mi cgi bin live on
> the internet all day.
> This may be a silly post but I am new to this cgi / perl area
> -please be patient !!!!!!!
Patience is not always in great supply at comp.lang.perl.misc, but
we're likely to be more patient if you follow netiquette and show some
application yourself - don't ask questions which can easily be answered
from the manuals or FAQ (frequently asked questions) files.
Best of luck.
--
Mark Bluemel
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Fri, 19 Nov 1999 17:00:47 +0100
From: "Matt King" <mattking@techie.com>
Subject: Re: help need please on perl
Message-Id: <813s6g$n5c$1@news.uk.ibm.com>
Installing PERL (www.perl.com) might be enough. You might want to just
install a web server (like Apache (www.apache.org)) and setup everything to
run on your home PC for testing. Once everything is finished, just upload
and your done. And you can be sure that it's working (usually), where as
just the PERL software wouldn't tell you everything. I do this my self and
this allows me to test new functionality before making it public. Depending
on what your doing this may or may not be practical for you.
Matt
------------------------------
Date: 19 Nov 1999 21:33:53 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Help Uploading Files to Web Site
Message-Id: <814fo1$69o$1@gellyfish.btinternet.com>
On 19 Nov 1999 10:47:13 GMT Jonathan Stowe wrote:
> Richard <richard@avocation.demon.co.uk> wrote:
>> The script below is supposed to upload an image file from a local PC to the
>> web site. It creates the file on the server but it's of zero bytes!!
>>
>> The script doesn't appear to copy anything from the source file into the
>> destination file........can anyone help or point me in the right direction
>> please?
>>
>
> Strangely a colleague of mine was caught by this slef same example in
> exactly the same way yesterday - The original code uses up the filehandle
> and then closes it - you are then reading from a closed filehandle
> in the bit you added. Cut all that other stuff out and try again.
>
We took this up in mail later and sorted it - the problem is (as it was
with my colleague ) the temptation to paste the saving stuff on the
end of the example code rather than put it in the proper place. Anyhow
this is the example amended to work (I think) :
#!/usr/local/bin/perl5 -w
use lib $0 =~ m#(.+)[/\\]#;
use CGI qw(:standard);
use CGI::Carp qw/fatalsToBrowser/;
print header();
print start_html("File Upload Example");
print strong("Version "),$CGI::VERSION,p;
print h1("File Upload Example"),
'',
strong(""),
p,
'',cite(''),'';
@types = ('count lines','count words','count characters');
# Start a multipart form.
print start_multipart_form(),
"Enter the file to process:",
filefield('filename','',45),
br,
checkbox_group('count',\@types,\@types),
p,
reset,submit('submit','Process File'),
endform;
# Process the form if there is a file name entered
if ($file = param('filename'))
{
$filename = "Cabbage.gif";
$UPLOAD_PATH = "";
$UPLOAD_FILE = $UPLOAD_PATH.$filename;
print "FILE NAME: $UPLOAD_PATH$filename<br>";
open (OUTFILE,">$UPLOAD_FILE") or die "Could not open $UPLOAD_FILE - $!\n";
binmode(OUTFILE);
while(read($file,$buffer,1024))
{
print OUTFILE $buffer;
}
print "Finished - Filname: $filename, Buffer: $buffer<BR><BR>";
close OUTFILE;
}
print end_html;
__END__
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 19 Nov 1999 21:19:52 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Help: 501 Protocol error
Message-Id: <814eto$69c$1@gellyfish.btinternet.com>
On Fri, 19 Nov 1999 15:43:37 +0800 LIN, Yong wrote:
> Hi, friends,
>
> I installed Apache HTTP server (1.3.9) and Perl
> Perl-5.00503-6 in my Linux box. I setup the Apache can be
> run CGI program. Finally, I wrote a CGI (using perl)
> program and want to execute it in browser. But, I got an
> error message:
>
> An Error Occurred
> 501 Protocol scheme 'http' is not supported
>
> What's the error message mean? How can I solve the
> problem? Thanks for any help.
>
> PS: In my CGI program, I used LWP, HTTP, URI.
>
I would hazard a guess that you made a URL in your program that was like:
http//www.balah.com/foo
Note there is something missing.
Otherwise something is horribly misinstalled.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Fri, 19 Nov 1999 21:47:24 +0000
From: andy <andy@ringtone.net>
Subject: How do I change the date in script so it adds 8 hours on.
Message-Id: <3835C56C.87DC5288@ringtone.net>
I have a script which sends each request to a log file with the time and
date. Hwoever being in the UK thge time is always 8 hours behind. The
command that asscociates the time etc is (I think):-
$WEBLEN = 8;
require "ctime.pl";
chop($date = &ctime(time));
Where would I put the +8 to make it GMT??
It later uses the $date to write to the log:-
print (WLOG $date, " ", $number, " ", $trans, " ", $email, " ", $fname,
" ", $lname, "\n");
--
Regards
Andy Clarke
andy.clarke@ringtone.net
http://www.ringtone.net/
--
Regards
Andy Clarke
andy.clarke@ringtone.net
http://www.ringtone.net/
------------------------------
Date: Fri, 19 Nov 1999 17:30:10 -0500
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: How do I change the date in script so it adds 8 hours on.
Message-Id: <Pine.GSO.4.10.9911191729020.26722-100000@crusoe.crusoe.net>
[posted & mailed]
> chop($date = &ctime(time));
>
> Where would I put the +8 to make it GMT??
Well, you merely add the number of seconds in 8 hours to the argument to
ctime():
ctime(time + 8 * 60 * 60)
--
MIDN 4/C PINYAN, USNR, NROTCURPI http://www.pobox.com/~japhy/
jeff pinyan: japhy@pobox.com perl stuff: japhy+perl@pobox.com
"The Art of Perl" http://www.pobox.com/~japhy/book/
CPAN ID: PINYAN http://www.perl.com/CPAN/authors/id/P/PI/PINYAN/
PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
------------------------------
Date: 19 Nov 1999 15:22:10 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How do I get a list of users in an NT domain?
Message-Id: <38356b22_2@newsread3.dircon.co.uk>
Tim Westlake <tim.westlakeNOtiSPAM@myremarq.com.invalid> wrote:
> In article <3833DCD1.5BAF29C4@patriot.net>, wintermute
> <carvdawg@patriot.net> wrote:
>> Use the Win32::Lanman module. Version 1.04 fixed some minor bugs,
>
> Where can I get it from? I looked on CPAN and it doesnt appear to be
> there.
>
If you are using Activeperl then you should just be able to type
ppm install Win32::Lanman
at your dos prompt ... If you dont know how to use PPM please see the
documentation that comes with Activeperl
/J\
--
"Mr Creutzfeldt and Mr Jakob: No-one had ever heard of these two eminent
medical men until someone had the
------------------------------
Date: Fri, 19 Nov 1999 16:29:04 GMT
From: Julien Lauper <julien_lauper@my-deja.com>
Subject: Re: How do I get a list of users in an NT domain?
Message-Id: <813ts8$sbv$1@nnrp1.deja.com>
> How can I get a list of users in an NT domain? There is a
> LocalGroupGetMember function in Win32::NetAdmin but not a similar one
> for global groups (in the documentation I have anyway). If there was
> then I could query the Domain Users global group.
Oh, There's a GroupGetMembers(server, groupName, user) in the
Win32::NetAdmin module I use!
This module was supplied with the ActivePerl distribution.
Pay attention if you find perl documentations on the Web. Many of them
are (very) old.
Julien
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 19 Nov 1999 15:16:33 -0600
From: "David J. Ritchie" <ritchie@fnal.gov>
Subject: Re: how to make perl executable
Message-Id: <3835BE31.11CEBB90@fnal.gov>
>
> It's people like you that make me glad there isn't.
>
Well, I could really use one for the people I am trying to teach perl. As
sixth, seventh, and eighth graders, the present thing you have to do under WNT
is pretty hokey.
--David
------------------------------
Date: Fri, 19 Nov 1999 22:09:12 GMT
From: crackbaby1@my-deja.com
Subject: HTML::Pager
Message-Id: <814hq5$bst$1@nnrp1.deja.com>
Can anyone point me to some documentation on how to use HTML::Pager?
I currently am using a mySQL database, perl... to create a dymamic site
that can show info on pages with a limit of four images/text per page.
If HTML::Pager is not the best way, any other ideas would be great.
Thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 19 Nov 1999 22:30:57 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Is there anyone out there with experience setting up Microsoft's Personal Web Server to run perl/CGI scripts?
Message-Id: <814j31$6b1$1@gellyfish.btinternet.com>
On Thu, 18 Nov 1999 17:27:43 -0500 Raymond Gordon wrote:
> The Personal Web Server instructions
> for configuring the browser to access a web site not connected to a network
> do not work for IE v/5.0.
>
The Activestate perl comes with a set of documentation that describes how
to set various servers up to work with Perl. If you have read that and are
still having problems then you should ask in the newsgroup :
comp.infosystems.www.servers.ms-windows
as the problem you are having is applicable to any language that you might
care to write a CGI program with.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 19 Nov 1999 15:03:10 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Is there no length() function?
Message-Id: <383566ae_2@newsread3.dircon.co.uk>
Jun Xu <jxu@wcom.net> wrote:
>
> Erik van Roode <newsposter@cthulhu.demon.nl> wrote in message
> news:811odp$2dr$1@internal-news.uu.net...
>> Jun Xu <jxu@wcom.net> wrote:
>>
>> > Function length() takes an array or hash as argument, not scalar.
>>
>> Where did you read that ???
>>
>
> OK, I goofed. Sorry about that.
>
Yeah, yeah but this is *us* you're talking about - you'll never be allowed
to forget ;-}
/J\
--
"Two or three of our staff were stoned on their way to work" - British
Airways Spokesman
------------------------------
Date: 19 Nov 1999 15:42:11 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: Is there no length() function?
Message-Id: <813r4j$7nq$1@internal-news.uu.net>
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> Yeah, yeah but this is *us* you're talking about - you'll never be allowed
> to forget ;-}
Unless you spot at least 10 mistakes in other postings. That's why
'we' are looking for mistakes, to rehabilitate outselves. Nice
side-effect, it is possible to get no help, but it is almost impossible
to get wrong advice :)
Erik
------------------------------
Date: 19 Nov 1999 15:49:38 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Is there no length() function?
Message-Id: <slrn83bhls.l1a.abigail@alexandra.delanet.com>
Bård Skaflestad (bardsk@math.ntnu.no) wrote on MMCCLXX September MCMXCIII
in <URL:news:dfwk8nf7dp3.fsf@martens.math.ntnu.no>:
\\
\\ #!/store/bin/perl -w
\\ #
\\ # Reads a file on STDIN and determines the number of characters
\\ # in its longest line.
\\
\\ use strict;
\\ use diagnostics;
\\
\\ use vars qw($max $nchar);
\\
\\ $max = 0;
\\
\\ while (defined(<>)) {
\\ $nchar = length($_);
\\ $max = $nchar if ($nchar > $max);
\\ }
\\
\\ print "Longest line is $length characters long\n";
\\
\\ and that's it. Its intent should be fairly obvious, but something is
\\ clearly wrong because the compilation phase produces the following:
\\
\\ <Errors>
\\ Global symbol "length" requires explicit package name at
\\ ./maxlength.pl line 18 (#1)
Did you check which line line 18 actually is? Hint: it's *not* the line:
$nchar = length ($_);
Abigail
--
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 19 Nov 1999 15:50:20 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Is there no length() function?
Message-Id: <slrn83bhn7.l1a.abigail@alexandra.delanet.com>
Jun Xu (jxu@wcom.net) wrote on MMCCLXX September MCMXCIII in
<URL:news:811nff$j5s$1@news.cis.ohio-state.edu>:
,,
,, Function length() takes an array or hash as argument, not scalar.
Oh yeah? Care to quote from the manual?
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 19 Nov 1999 15:24:41 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: legal names and about sorting
Message-Id: <slrn83bg74.l1a.abigail@alexandra.delanet.com>
Larry Rosler (lr@hpl.hp.com) wrote on MMCCLXXI September MCMXCIII in
<URL:news:MPG.129e47f0e6ff1ae998a236@nntp.hpl.hp.com>:
%%
%%
%% I'm beginning to like 'Prefix sort' myself. People may be scared away
%% by pack(), as several posters have said recently; sprintf() will often
%% do the job; but there is always a prefix no matter how generated.
I still claim "sort" shouldn't be in the name. GRT, with the T standing
for transform is my suggestion - it fits with ST.
Abigail
--
sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Fri, 19 Nov 1999 14:07:41 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: legal names and about sorting
Message-Id: <MPG.129f6a0cad105b8398a241@nntp.hpl.hp.com>
In article <slrn83bg74.l1a.abigail@alexandra.delanet.com> on 19 Nov 1999
15:24:41 -0600, Abigail <abigail@delanet.com> says...
> Larry Rosler (lr@hpl.hp.com) wrote on MMCCLXXI September MCMXCIII in
> <URL:news:MPG.129e47f0e6ff1ae998a236@nntp.hpl.hp.com>:
> %%
> %% I'm beginning to like 'Prefix sort' myself. People may be scared away
> %% by pack(), as several posters have said recently; sprintf() will often
> %% do the job; but there is always a prefix no matter how generated.
>
> I still claim "sort" shouldn't be in the name. GRT, with the T standing
> for transform is my suggestion - it fits with ST.
That's GReaT!
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 19 Nov 1999 16:21:00 GMT
From: "Rich Pierson" <info@marinermotel.com>
Subject: Limiting Search Results
Message-Id: <MNeZ3.45$M65.4121@news>
Hello,
I hope this is a simple question for all you perl gurus out there...
Here's the condensed version of the problem, which should be adequate: I
have a pretty decent search script that originated with one I found on the
web but modified so much you'd hardly recognize it. It's used to search a
pipe delimited flat ascii text file, consisting of about 5000 records.
I want to figure out a way that I can manipulate the value of $count
(matching number of records) in such a way as to render the first, lets say,
10 records, with the option of viewing the next 10 on the next page, and so
on, and so on.
You know what I mean... "Displaying records 1 through 10 of 56" for example.
So the variable derived from $count which would equal the first 10 records
would somehow be incorporated in the foreach statement that is used to
render the table containing the search results.
But how??? Anyone have any ideas, maybe enough to point me in the right
direction at least?
Thanks.
------------------------------
Date: Fri, 19 Nov 1999 16:25:06 -0500
From: "Robert M. Craver II" <craver@eddy.nos.noaa.gov>
Subject: mktime Returns Unexpected Values
Message-Id: <3835C031.5A0305E2@eddy.nos.noaa.gov>
After much fustration in developing my primary program, I developed this
small test script to see what the heck POSIX::mktime does before and
after daylight savings changes. Eventually, I need my program to
convert localtimes from numerous timezones (nationwide data in a
database) to UTC and vice versa. What I've found are the results do not
match what I expected:
1. the localtime function seems to insist the October shift occurs at 1
am.
2. output epoch ($time_t) does not match similar tests with UNIX date
command
OUTPUT OF UNIX DATE COMMAND (date +%s 'date string')
4/4/99 1:00:923205600
4/4/99 2:00:923209200
4/4/99 3:00:923209200
10/31/99 1:00:941346000
10/31/99 2:00:941353200
10/31/99 3:00:941356800
SIMILAR OUTPUT OF PERL SCRIPT
4/4/99 1:00 -> 04/04/1999 01:00 EST (0) 923205600
4/4/99 2:00 -> 04/04/1999 03:00 EDT (1) 923209200
4/4/99 3:00 -> 04/04/1999 04:00 EDT (1) 923212800
10/31/99 00:00 -> 10/31/1999 01:00 EDT (1) 941346000
10/31/99 01:00 -> 10/31/1999 01:00 EST (0) 941349600
10/31/99 02:00 -> 10/31/1999 02:00 EST (0) 941353200
10/31/99 03:00 -> 10/31/1999 03:00 EST (0) 941356800
---BEGIN SCRIPT---
use POSIX;
my $time_t = '';
my $isdst = '';
my $zone = '';
$ENV{'TZ'} = 'EST5EDT';
while(<>) {
chomp();
my ($m,$d,$y,$H,$M,$S) = split(/:|\s+|\//);
$time_t = mktime($S,$M,$H,$d,($m - 1),$y);
$isdst = (localtime($time_t))[8];
if ($isdst > 0) {
$zone = 'EDT';
} else {
$zone = 'EST';
}
($S,$M,$H,$d,$m,$y) = localtime($time_t);
$time = sprintf("%.2i/%.2i/%.4i %.2i:%.2i",
($m + 1),$d,(1900 + $y),$H,$M);
print "$time $zone ($isdst) $time_t\n";
}
---END SCRIPT--
------------------------------
Date: 19 Nov 1999 21:56:54 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Module for Netware NDS ?
Message-Id: <814h36$69r$1@gellyfish.btinternet.com>
On Fri, 19 Nov 1999 10:33:20 -0600 Chris Beatson wrote:
> I'm looking for the Netware::NDS module. It is listed under CPAN as an
> available module, but I could not find a place to download it. Emailed the
> author, but no reply. If anyone knows where I can get hold of this module,
> or any other solutions to interface with NDS, I would appreciate it.
>
I have a little while out of the Netware world but I recall that this
module is not free and you can get a trial version from wherever - I think
that you will be able to find a reference to it from somewhere on
<http://developer.novell.com> (or wherever) - the good news is that it is
rather good and does most of the things that you would want - you will of
course need to have a recent Netware client for it to work. An alternative
if you want only to read the NDS objects is to use the Novell ODBC driver
for NDS and DBD::ODBC - it didnt allow you to right to the directory the
last time I looked at it.
BTW Novell run some private newsgroups from their servers for the
discussion of these matters - you might want to check these out for
more information on these matters.
Have fun.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 1436
**************************************