[17638] in Perl-Users-Digest
Perl-Users Digest, Issue: 5058 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Dec 7 21:05:50 2000
Date: Thu, 7 Dec 2000 18:05:17 -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: <976241117-v9-i5058@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 7 Dec 2000 Volume: 9 Number: 5058
Today's topics:
Re: ActiveStatePerl and Perl Expect module <lincwils@teleport.com>
Re: Anonymous Array Reference ?? nobull@mail.com
Re: Beginner's question <harrisr@bignet.net>
Can anybody help ??? <kjs404@hotmail.com>
Re: Can anybody help ??? <jeff@vpservices.com>
Re: comparing timedates HELP (Chris Fedde)
CSS files in a cgi script <c.darlington@virgin.net>
Displaying an image <c.darlington@virgin.net>
Re: find function nobull@mail.com
form-results on other page <harald@wanadoo.nl>
Re: FTP question <johngros@Spam.bigpond.net.au>
Re: Getting file properties <krahnj@acm.org>
GLOBAL TELE COMMUTE - PERL - JAVA -JS-CSS-HTML-DreavWea Telecommuter@Visto.com
Re: HASH OF LISTS - Question nobull@mail.com
Re: Help - passing hash array into a subroutine nobull@mail.com
Re: How could I get the time of a server? (Chris Fedde)
How do I capture output from a print command huem@my-deja.com
Re: How do I capture output from a print command (Tad McClellan)
Re: How to insert Perl Code inside E-mail text? nobull@mail.com
Re: Linked lists <Koen@Verbeke.net>
Re: Linked lists (Tom Hoffmann)
Re: Making Perl output window on NT scrollable. <carvdawg@patriot.net>
Re: MUMPS module nobull@mail.com
Need a little help with a warning message from chomp. <robert@chalmers.com.au>
Re: Need a little help with a warning message from chom (Tad McClellan)
Re: Need a little help with a warning message from chom <robert@chalmers.com.au>
Re: newbie question about flatfiles (Chris Fedde)
Re: newbie question about flatfiles <khedger@mindspring.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 7 Dec 2000 17:45:27 -0800
From: "Dennis Wilson" <lincwils@teleport.com>
Subject: Re: ActiveStatePerl and Perl Expect module
Message-Id: <p0XX5.8844$V6.487954@nntp3.onemain.com>
Thanks, I will try that. It is just that the shop I was thinking about using
this in uses
windows and does not have any Tcl expertise.
RGiersig@cpan.org wrote in message <90nl13$2l$1@nnrp1.deja.com>...
>In article <6iiX5.715$V6.79377@nntp3.onemain.com>,
> "Dennis Wilson" <lincwils@teleport.com> wrote:
>> Has anyone found this module on Activestate's site? I saw it listed,
>but
>> when I tried to get it with ppm, it was not found.
>
>This doesn't surprise me. Expect for Perl was developed for
>Unix systems and would have to be ported specifically for NT,
>and NT is not even near Unix. I took a look at the Tcl/Expect
>NT port to see how they did the command spawning, and found some
>real deep hacks there. I will see if I can make provisions for
>an NT port when I redesign and rewrite the Expect module somewhen
>in the future, but I cannot make any promises regarding its
>feasibility.
>
>If you need something like Expect, your best bet for NT is
>the Tcl/Expect port, available at
>
> http://bmrc.berkeley.edu/people/chaffee/expectnt.html
>
>Hope this helps,
>
>Roland
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
------------------------------
Date: 07 Dec 2000 18:23:52 +0000
From: nobull@mail.com
Subject: Re: Anonymous Array Reference ??
Message-Id: <u9zoi85buv.fsf@wcl-l.bham.ac.uk>
otrcomm***NO-SPAM***@wildapache**NO-SPAM***.net (OTR Comm) writes:
> What I need to do I guess is know how to expand [qw(one two three
> four)] into a variable when it is embedded in a string and then have
> perl intrepret the resultant variable into a hash.
Can you explain why you think this is what you want to do? This seems
to bare no relationship to the thread so far.
So you want to interpret the string:
my $string="[qw(one two three four)]";
As the hash: one => 'two', three => 'four'
Sure, no problem:
%{{@{eval($string)}}}
But I'm 100% sure that's not what you want. So sure that I'm not even
going to bother with the normal lecture about the evil of eval.
> For example, say I have a string "This is the hash: [qw(one two
> three four)]",
"Cieci, n'est pas une pipe?"
> how can I parse [qw(one two three four) out of the string into a
> variable, say $card_values and then use $card_values in my
> popup_menu structure?
Take a step back, what it it you seek to achieve?
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 7 Dec 2000 20:09:28 -0500
From: "Randy Harris" <harrisr@bignet.net>
Subject: Re: Beginner's question
Message-Id: <t30d545vbk3nbf@corp.supernews.com>
Abigail <abigail@foad.org> wrote in message
news:slrn92ukur.4kt.abigail@tsathoggua.rlyeh.net...
> On 5 Dec 2000 20:03:30 -0600, Logan Shaw (logan@cs.utexas.edu) wrote
in comp.lang.perl.misc <URL: news:<90k6pi$e3i$1@pip.cs.utexas.edu>>:
> ++
> ++ That, of course, is not possible. You need a functioning computer
to
> ++ run Perl scripts.
>
>
> Nah, anyone can admire a Perl program and run it in their heads.
>
An excellent suggestion, but when I tried it I got a memory access
violation.
Randy
------------------------------
Date: Fri, 8 Dec 2000 13:17:26 +1300
From: "Kelvin Sim" <kjs404@hotmail.com>
Subject: Can anybody help ???
Message-Id: <dPVX5.473$KAv.15859926@news.xtra.co.nz>
Hi All
Sorry for being a pain, as I'm learning as I go along....
What is wrong with this statement
print ("Do you wish to continue ? y / n ");
$an = <STDIN>;
chop $an;
if ($an eq "N") {
die ("OK Have a good one");
} else { print ("Still running... ");
}
when I answer "N" the die statement prints and then I get the following text
added onto the end of the die statement..
at D:\Perl\test.pl line 52, <STDIN> line 3.
...what is causing this ?? and how do I stop this text appearing ??.
Cheers
Kelvin
------------------------------
Date: Thu, 07 Dec 2000 16:27:09 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Can anybody help ???
Message-Id: <3A302ADD.376B6C0F@vpservices.com>
Kelvin Sim wrote:
>
> if ($an eq "N") {
> die ("OK Have a good one");
> } else { print ("Still running... ");
> }
>
> when I answer "N" the die statement prints and then I get the following text
> added onto the end of the die statement..
>
> at D:\Perl\test.pl line 52, <STDIN> line 3.
>
> ...what is causing this ?? and how do I stop this text appearing ??.
Your problem is with the function "die", therefore the first thing you
should do is look up the standard documentation for that function, e.g.
by typing "perldoc -f die" at a command prompt or by looking the
function up in any on- or off- line Perl reference. Had you done so,
you would see both what is causing this behaviour and how to stop it:
die EXPR ...
If the value of EXPR does not end in a newline, the current
script line number and input line number (if any) are also
printed, and a newline is supplied.
So, either add a newline ("\n") to your die message, or instead of using
die(), use print() followed by exit().
--
Jeff
------------------------------
Date: Thu, 07 Dec 2000 23:18:55 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: comparing timedates HELP
Message-Id: <zVUX5.41$B9.170591744@news.frii.net>
In article <90ot4g$1i8$1@nnrp1.deja.com>, <any_v@my-deja.com> wrote:
>Hi everybody,
>I have a script that takes from a web page two dates as "startdate =
>2000-11-27" and "enddate = 2000-11-30". For this period of time I insert
>into the databese one record with some more information for this period.
>I would like to insert a new record for each day, but still take the
>dates from the form as a period. I thuoght about a block that insert a
>new record for $i e.g. from nov.27th to nov.30th, but I dont know whow
>to obtain the difference between that dates. Any ideea???
>Thanks,
>Any
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
The faq says:
How can I compare two dates and find the difference?
If you're storing your dates as epoch seconds then simply
subtract one from the other. If you've got a structured date
(distinct year, day, month, hour, minute, seconds values), then
for reasons of accessibility, simplicity, and efficiency, merely
use either timelocal or timegm (from the Time::Local module in
the standard distribution) to reduce structured dates to epoch
seconds. However, if you don't know the precise format of your
dates, then you should probably use either of the Date::Manip
and Date::Calc modules from CPAN before you go hacking up your
own parsing routine to handle arbitrary date formats.
Good Luck
chris
--
This space intentionally left blank
------------------------------
Date: Fri, 8 Dec 2000 01:12:22 -0000
From: "Virgin News" <c.darlington@virgin.net>
Subject: CSS files in a cgi script
Message-Id: <EAWX5.2387$tR1.44412@news2-win.server.ntlworld.com>
Is it possible to link a .css file in a cgi script to format the html output
of the script?
Regards
Chris
------------------------------
Date: Fri, 8 Dec 2000 01:11:23 -0000
From: "Virgin News" <c.darlington@virgin.net>
Subject: Displaying an image
Message-Id: <EAWX5.2386$tR1.44412@news2-win.server.ntlworld.com>
I have created a script that reads from a .csv file to produce the data for
the page and output it as html.
i also want to use the club logo which is a jpg file.
I have tried using the following line but it doesnt work.
print "<img src='footie.jpg'>";
Can anyone help please?
------------------------------
Date: 07 Dec 2000 12:45:28 +0000
From: nobull@mail.com
Subject: Re: find function
Message-Id: <u98zps763b.fsf@wcl-l.bham.ac.uk>
nodo70@my-deja.com writes upside down and qoutes the whole of the
article he is following-up. How many times do we have to tell you
that this is considered offensive? Why do you feel compelled come
here and insult us like this? Enquiring minds want to know.
> Anyone know why it only find only one time and exit out of for loop
> base on snip code below?
> sub wanted {
> unless (-d $_) {
> $_ = $File::Find::name;
> s/^.\///; # get rid of leading "./"
> push @realFiles, $_;
> }
> }
See perldoc File::Find. Pay particular attension to the bit where is
says of the "wanted" subroutine that, "File::Find assumes that you
don't alter the $_ variable."[1]
Then insert the missing local() or use a my() variable instead.
Or simply avoid the redundant temporary variable altogether:
sub wanted {
push @realFiles, $File::Find::name =~ /^.\/(.*)/ unless -d;
}
[1] BTW it should actually say, "File::Find assumes that you don't
alter the $_ variable or change the current working directory."
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Fri, 8 Dec 2000 00:10:16 +0100
From: "Harald ter Haar" <harald@wanadoo.nl>
Subject: form-results on other page
Message-Id: <3a3018f2$0$614@reader5>
Hello,
My form leads to a cgi-script wich is on an other web-domain. This is
because my host doesn't support cgi-scripts. Now, I want the printing result
of the form , (for example "Thank you for using my form, klick here to go
back") not on de cgi-page itself, but back at the place where the form is.
Note: I want this to avoid the commercial-popups wich appear by giving
commands in de cgi to print something as html-document. I hope I made myself
clear enough that you can help me.
Thanks,
Harald
------------------------------
Date: Fri, 08 Dec 2000 01:19:18 GMT
From: "John Boy Walton" <johngros@Spam.bigpond.net.au>
Subject: Re: FTP question
Message-Id: <qGWX5.8521$xW4.70257@news-server.bigpond.net.au>
You could try faking having downloaded the first X kb of the file by
manufacturing a file with the same name with the first X kb just garbage
text then resume the download.
"Lucas" <wstsoi@hongkong.com> wrote in message
news:90ondo$9p52@imsp212.netvigator.com...
> I got a large log file that holding over 500,000 records, and each
> record per line:
>
> Log>>>>>>>>>>>
> 123456789 1997/8/24 13:24 ...
> 123456790 1997/8/24 13:50 ...
> ...
> ......
> .........
>
> 145678902 2000/11/23 2:30 ...
> End of the log >>>>>>>>>>>
>
>
> I only could telnet or FTP to access it, I need to write a
> scipt to monitor the log and what I need could be the only
> last 400 or 500 records (recent logs), so what ways could
> let me get what I need, nut not get the whole file? Is it possible
> to get the last 1Kb of the log file by FTP or whatever?
>
> Thanks very much.
>
>
>
>
------------------------------
Date: Thu, 07 Dec 2000 23:27:04 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Getting file properties
Message-Id: <3A301D33.E0D697A3@acm.org>
Adam Levenstein wrote:
>
> Thanks all...Now, next question in the same area:
>
> My two lines read like this:
>
> ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks
> = stat('/tmp/lock.content');
> ($fsec,$fmin,$fhour,$fmday,$fmon,$fyear,$fwday,$fyday,$fisdst) = $mtime;
Change this to:
($fsec,$fmin,$fhour,$fmday,$fmon,$fyear,$fwday,$fyday,$fisdst) =
localtime($mtime);
John
------------------------------
Date: Thu, 07 Dec 2000 23:26:07 GMT
From: Telecommuter@Visto.com
Subject: GLOBAL TELE COMMUTE - PERL - JAVA -JS-CSS-HTML-DreavWeaver
Message-Id: <j0VX5.3552$c32.194270@typhoon.san.rr.com>
*** TELE COMMUTE ONLY ****
WEB PAGE * PERL * PROGRAMMER
MUST HAVE EXCELLENT EXPERIENCE WITH:
* DREAMWEAVER (Large Domain Mgt.) PREFERRED
* DHTML AND CSS CAPABILITIES OF DREAMWEAVER
* WINDOWS NT 4.0 IIS 5.0 (server)
* WEB PROGRAMMING: PERL / CGI / JavaScript / DHTML / CSS / JAVA
* PROGRAMMING: C / Java
***** ON A SCALE FROM 1 - 10 PERL must be 10 *****
***** ON A SCALE FROM 1 - 10 NT4.0 ISS SERVER = 10 ***
15 TO 20 HOURS PER WEEK
$15.00 to $25.00 per hour commensurate with experience.
* Using a Remote Control software utility called TIMBUKTU
* 2 people can work on the same computer simultaneously
even though thousands of miles apart..
* Timbuktu has an audio channel and chat features.
* High-Bandwidth Not necessary, but PREFERRED.
* Specific "Log-On' Schedule required.
* Flexible
* Prefer Mornings: Pacific Standard Time (PST),
but afternoons, ok.
* 2 to 3 hours per remomte 'log-on' session using Timbuktu
* 2 to 3 times per week minimum.
* Some work done off-line, but this is PRIMARILY a
real-time, log-on position.
* Instead of having a specific schedule at an office,
a specific computer log-on schedule is required.
* Mainly, position is for highly qualified 'back-end'
programmers to use their skills on front-end web
page programming mainly using PERL & JavaScript.
* Please respond directly to:
Telecommuter@Law.com
++++++ MUST INCULDE +++++++
+ RESUME / CV
+ URL's DEMONSTRATING WEB PAGE PROGRAMMING WORK
* WHICH NESWGROUP DID YOU SEE THIS ANNOUNCEMENT ?
------------------------------
Date: 07 Dec 2000 19:04:22 +0000
From: nobull@mail.com
Subject: Re: HASH OF LISTS - Question
Message-Id: <u9vgsw59zd.fsf@wcl-l.bham.ac.uk>
WA Support writes:
> Hello,
>
> If I define a hash of list, say like:
>
> %HoL = (
> flintstones => [ "fred", "barney" ],
> jetsons => [ "george", "jane", "elroy" ],
> simpsons => [ "homer", "marge", "bart" ],
> );
>
> I can print $HoL{flintstones}[0] and get "fred", so I know the hash is
> loading.
>
> How do I pass reference to the hash with an input statement?
There is no input statement.
> I have tried:
>
> print '<input type=hidden name=structures value="',$HoL'">';
>
> but does not appear to work.
Not work, hell it doesn't even pass the syntax check. And you appear
to be trying to print the value of $HoL not %HoL. $HoL and %HoL are
totally separate variables.
But at least we now have some clue what you are talking about. You
want to put structured data type into a hidden HTML field.
HTML fields hold strings! If you want to put a more complex structure
into an HTML field you have to convert it into a string.
One way to convert a arbitrarily complex nested hash/list construct
into a string is to use Data::Dumper module (although it is probably
not the best).
use Data::Dumper;
my $structures = Data::Dumper->new([\%HoL],['*HoL'])->Indent(0)->Useqq(1);
use CGI;
my $query = CGI->new;
print $query->hidden('structures',$structures->Dump);
Hopefully, when you chose a mechanism to convert your hash to a string
you chose one you could reverse.
In the above case you could reverse it with eval():
eval $query->param('structures');
But you _do_not_want_to_do_that! This would allow anyone to execute
arbitary code on your computer.
# Untested
use Safe;
my $cpt = Safe->new;
$cpt->deny(':base_io');
$cpt->share('%HoL');
$cpt->reval($query->param('structures'));
Note: even Safe.pm is not totally safe against a DOS attack.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 07 Dec 2000 18:25:05 +0000
From: nobull@mail.com
Subject: Re: Help - passing hash array into a subroutine
Message-Id: <u9wvdc5bsu.fsf@wcl-l.bham.ac.uk>
abigail@foad.org (Abigail) writes:
> On Wed, 06 Dec 2000 19:06:31 GMT, Stephen Patterson (spam@s.patterson.freeuk.com) wrote in comp.lang.perl.misc <URL: news:<X6wX5.23936$eT4.1564091@nnrp3.clara.net>>:
> ++ Is there a way to pass an entire hash array into a subroutine preserving the
> ++ indexing in the hash?
>
>
> Yes. In the most obvious way.
Once again Abigail demonstates her unique concept of "obvious".
I suspect most people would consider the most obvious way is:
sub func { my %h = @_; }
func(%hash);
This reconstructs rather than preserves the indexing (and has other
disadvantages if you want to add more parameters to func() at a later
date).
The right way to do (and presumably the one Abigail considers "most
obvious") is to pass by reference, either by using an explicit \ in the
call or a prototype.
For details:
perldoc perlsub/"Pass by Reference"
perldoc perlsub/"Prototypes"
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 07 Dec 2000 23:13:38 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: How could I get the time of a server?
Message-Id: <CQUX5.40$B9.170591744@news.frii.net>
In article <90onm4$ci85@imsp212.netvigator.com>,
Lucas <wstsoi@hongkong.com> wrote:
>Hi,
>
>How could I get the time, date of a server by script?
>I just checked some documents about telnet and Net::FTP,
>but I couldn't find any clues.
>
You can check all the normal ways; daytime socket, timed, ntp. If
those don't work you might try hitting the http port and looking
at the Date: header that comes back in the HTTP stream. There are probably
other methods too. Don't limit your creativity.
Good luck
chris
--
This space intentionally left blank
------------------------------
Date: Fri, 08 Dec 2000 00:37:56 GMT
From: huem@my-deja.com
Subject: How do I capture output from a print command
Message-Id: <90pah5$d0b$1@nnrp1.deja.com>
Hi,
How do I capture the out put from the print
command. I would prefer capture it directly not
from a file. I use perl4.
$var="blah";
open(PIPE, "|cmd");
print PIPE,"$var";
I have tried $out=print ... to no avail.
Thanks.
Andrew.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 7 Dec 2000 19:17:37 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How do I capture output from a print command
Message-Id: <slrn930a51.v7v.tadmc@magna.metronet.com>
huem@my-deja.com <huem@my-deja.com> wrote:
>I use perl4.
Then you are on your own.
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 07 Dec 2000 18:09:36 +0000
From: nobull@mail.com
Subject: Re: How to insert Perl Code inside E-mail text?
Message-Id: <u93dg06r33.fsf@wcl-l.bham.ac.uk>
Amine Laghaout <alaghaout@trentu.ca> writes:
> I have a dumb question:
> Subject: How to insert Perl Code inside E-mail text?
Yes, I agree the question is dumb. That's not to say you are dumb for
not knowing the answer. The way you put the question is dumb.
The fact that there happens to be mailer program at the other end of
the pipe to which you are writing is not relevant. How can the
syntax/semantics of Perl possibly depend on what's at the other end of
a pipe?
What you actually wanted to ask is "Interpolate arbitrary code inside
a here-document?"
Now you can be forgiven for not knowing the correct terminology but
without too much effort you could probably have come up with something
like:
"Embed code inside a << chunk?"
Here-documents (unless the end maker is introduced in single qoutes)
obey the same interpolation rules as double qouted strings. ("perldoc
perlop" for details). At some level you must have known this fact
because you are already using it.
The way to interpolate arbitary stuff into a double-qouted string is
${BLOCK} or @{BLOCK}, where the last statement of BLOCK must evaluate
to a scalar or array reference respectively.
However if BLOCK would be non-trivial it would probably aid redability
to build up the stuff in a variable and interpolate that instead to or
move the code into a subroutine: @{[ some_subroutine() ]}. Note:
some_subroutine() is called in a list context and the returned list is
interpolated according to the usual rules - i.e. it is implicity
join()ed using space (well $" actually) as the delimiter.
> Is there another way to have some Perl code inside there?
Yes. You do not have to limit yourself to genertaing the whole
message to be passed to down the pipe to the mailer program in one
print statement. Simply build up the desired message using multiple
print statements to the pipe. The mailer program will not process the
message until you close the pipe or otherwise indicate the
end-of-message.
> Is it possible to write a message into a file and send that file via
> e-mail?
Yes, but I can't see how this is relevant. Writing to a pipe and
writing to a file are much the same.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 07 Dec 2000 23:13:07 GMT
From: Koen Verbeke <Koen@Verbeke.net>
Subject: Re: Linked lists
Message-Id: <Pine.LNX.4.21.0012080111020.4910-100000@anfalas.middle-earth>
And the clouds parted on 7 Dec 2000, and Abigail wrote:
> On Thu, 07 Dec 2000 11:56:58 GMT, Koen Verbeke (Koen@Verbeke.net) wrote in comp.lang.perl.misc <URL: news:<Pine.LNX.4.21.0012071358000.2685-100000@anfalas.middle-earth>>:
> ++
> ++ Can someone give me an example of a linked list and tell me the story
> ++ behind it?
>
>
> You should be consulting a text book about data structures, not a newsgroup
> about a language.
>
>
> Abigail
>
I'm sorry! I thought this was a perl thing... I'm very new to programming.
Thanks to Jeff Pinyan who gave me a good idea what it's all about via
e-mail. I really was clueless. Thanks Jeff!
Bye,
- Koen
------------------------------
Date: Fri, 08 Dec 2000 00:04:38 GMT
From: tom.hoffmann@worldnet.att.net (Tom Hoffmann)
Subject: Re: Linked lists
Message-Id: <slrn93095s.li.tom.hoffmann@localhost.localdomain>
On Thu, 07 Dec 2000 23:13:07 GMT, Koen Verbeke <Koen@Verbeke.net> wrote:
>And the clouds parted on 7 Dec 2000, and Abigail wrote:
>
>> On Thu, 07 Dec 2000 11:56:58 GMT, Koen Verbeke (Koen@Verbeke.net) wrote in comp.lang.perl.misc <URL: news:<Pine.LNX.4.21.0012071358000.2685-100000@anfalas.middle-earth>>:
>> ++
>> ++ Can someone give me an example of a linked list and tell me the story
>> ++ behind it?
In the future, you may also want to use an Internet search engine. My
search for "linked lists" turned up dozens of hits.
>>
>>
>> You should be consulting a text book about data structures, not a newsgroup
>> about a language.
>>
>>
>> Abigail
>>
>
>I'm sorry! I thought this was a perl thing... I'm very new to programming.
>
>Thanks to Jeff Pinyan who gave me a good idea what it's all about via
>e-mail. I really was clueless. Thanks Jeff!
>
>
>
>Bye,
> - Koen
>
>
------------------------------
Date: Thu, 07 Dec 2000 20:54:22 -0500
From: H C <carvdawg@patriot.net>
Subject: Re: Making Perl output window on NT scrollable.
Message-Id: <3A303F4E.7E774A5D@patriot.net>
Why not simply modify a Command Prompt window accordingly, and choose to apply
the changes to "Modify Shortcut that started this window"??
Clyde Ingram wrote:
> I have a number of Perl scripts, on NT, which pop-up the usual window to
> trace STDOUT and STDERR output.
>
> They spew out shedload of useful trace information.
> Sadly, I cannot PageUp to look back at what has just scrolled out of view.
>
> Can anyone say how to add scrollbars and a nice long memory buffer to this
> window?
>
> Thank-you,
> Clyde
--
Q: Why is Batman better than Bill Gates?
A: Batman was able to beat the Penguin.
------------------------------
Date: 07 Dec 2000 18:24:09 +0000
From: nobull@mail.com
Subject: Re: MUMPS module
Message-Id: <u9y9xs5bue.fsf@wcl-l.bham.ac.uk>
alichambers@madasafish.com writes upside down:
> Thanks for your reply.
Next time, please express your gratude by posting the right way up.
> In article <u9y9xu7mnx.fsf@wcl-l.bham.ac.uk>,
> nobull@mail.com wrote:
> > alichambers@madasafish.com writes:
> >
> > > I'm looking for a module for PERL that will allow me to connect to a
> > > MUMPS system. Does anyone have any leads?
> >
> > Connect using what protocol? OMI? MUMPS/188? MSM-NET? DSM-DDP? Some
> > other proprietory protocol? CORBA? HTTP?...
>
> I'm looking to test (via PERL remotely) whether
> a certain global variable in our DSM/MUMPS system is locked or not
> (when locked it indicates a central process is running). Hence I'll be
> able to design a webinterface that has a RUNNING/NOT RUNNING
> information box.
>
> I'm not sure about the connection protocol - I'll have to look into it.
> I think it's DSM.
Making a Perl interface to the DSM-DDP proprietory protocol seems like
a bad idea - even assuming you could get hold of the protocol specs.
I think OMI would be a much better solution. Or, of course, you could
simply run MUMPS code script using backticks.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Fri, 8 Dec 2000 11:01:01 +1000
From: "Robert Chalmers" <robert@chalmers.com.au>
Subject: Need a little help with a warning message from chomp.
Message-Id: <xbWX5.48$_b5.4432@nsw.nnrp.telstra.net>
Can someone tell me why I'm getting this error/warning....
Use of uninitialized value in scalar chomp at /usr/local/lib/perl5/site_perl/5.6
offending line...
for ( keys %args ) { chomp ($args{ $_ }); $self->{ $_ } = $args{ $_ } }
I can't find a definitive reference to the mysteries of chomp, even in the perl books I have...
and I can't figure out what this is telling me ..
thanks for any help
Robert
--
---
Robert Chalmers
http://www.quantum-radio.net.au Quantum Radio robert@quantum-radio.net.au
http://www.inexpensivewebsites.com Domain Name Registrations info@inexpensivewebsites.com
------------------------------
Date: Thu, 7 Dec 2000 19:27:27 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Need a little help with a warning message from chomp.
Message-Id: <slrn930anf.v7v.tadmc@magna.metronet.com>
Robert Chalmers <robert@chalmers.com.au> wrote:
>Can someone tell me why I'm getting this error/warning....
>Use of uninitialized value in scalar chomp at /usr/local/lib/perl5/site_perl/5.6
All of the messages that perl might issue are documented in
the perldiag man page.
perldoc perldiag
>offending line...
>
> for ( keys %args ) { chomp ($args{ $_ }); $self->{ $_ } = $args{ $_ } }
$args{ $_ } has not been given a value (it is undef).
>I can't find a definitive reference to the mysteries of chomp,
> even in the perl books I have...
It is not related to chomp(). That is just where it happened
to happen.
print $args{ $_ };
will also give a "Use of uninitialized value" warning. Try it and see.
>and I can't figure out what this is telling me ..
If you don't want to go look it up, you can ask perl to look
it up for you, by putting this near the top of your program:
use diagnostics;
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 8 Dec 2000 12:08:12 +1000
From: "Robert Chalmers" <robert@chalmers.com.au>
Subject: Re: Need a little help with a warning message from chomp.
Message-Id: <xaXX5.74$_b5.5085@nsw.nnrp.telstra.net>
Thanks for all that. more moves than a game of chess. So much in Perl it's easy to miss the basics...
Well, now at least I can dig out the offending undefined variable - but unfortunatly "use diagnostics" turned up a whole slew of
other errors... :-)
Thanks
Robert
>
> >Can someone tell me why I'm getting this error/warning....
> >Use of uninitialized value in scalar chomp at /usr/local/lib/perl5/site_perl/5.6
>
>
> All of the messages that perl might issue are documented in
> the perldiag man page.
>
> perldoc perldiag
>
>
> >offending line...
> >
> > for ( keys %args ) { chomp ($args{ $_ }); $self->{ $_ } = $args{ $_ } }
>
>
> $args{ $_ } has not been given a value (it is undef).
>
>
> >I can't find a definitive reference to the mysteries of chomp,
> > even in the perl books I have...
>
>
> It is not related to chomp(). That is just where it happened
> to happen.
>
> print $args{ $_ };
>
> will also give a "Use of uninitialized value" warning. Try it and see.
>
>
> >and I can't figure out what this is telling me ..
>
>
> If you don't want to go look it up, you can ask perl to look
> it up for you, by putting this near the top of your program:
>
> use diagnostics;
>
>
>
> --
> Tad McClellan SGML consulting
> tadmc@metronet.com Perl programming
> Fort Worth, Texas
------------------------------
Date: Thu, 07 Dec 2000 23:08:09 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: newbie question about flatfiles
Message-Id: <tLUX5.39$B9.188722176@news.frii.net>
In article <90oqp2$ver$1@nnrp1.deja.com>, <nailism@my-deja.com> wrote:
>I have been asked to construct a "suggestion box"
>the way that I have envisioned it would be,
>when a message is posted, save that info into a flat txt file.
>
>So I actualy have 2 questions
>one how do I get information from that flat file into an array?
open(F, "some_flat_file") or die "can't open some_flat_file: $!";
my @a = <F>;
>two, Is that the best way to accomplish my task?
>
The best way to accomplish your task is to get something working
and show it to the customer. Then fix what the customer does not
like. Flat file is as good as anything else from that point of
view.
chris
--
This space intentionally left blank
------------------------------
Date: Fri, 08 Dec 2000 00:55:10 GMT
From: "bigtiny" <khedger@mindspring.com>
Subject: Re: newbie question about flatfiles
Message-Id: <OjWX5.81618$751.1971364@typhoon.ne.mediaone.net>
Uhhhgg...errrr....I have to disagree with Chris here.....
I would suggest getting a clearly understood list of requirements from the
customer, designing your program to fill those requirements....THEN show it
to the customer. And if they don't like it...you can talk about your fee to
start work on the next release....
k
Chris Fedde <cfedde@fedde.littleton.co.us> wrote in message
news:tLUX5.39$B9.188722176@news.frii.net...
> In article <90oqp2$ver$1@nnrp1.deja.com>, <nailism@my-deja.com> wrote:
> >I have been asked to construct a "suggestion box"
> >the way that I have envisioned it would be,
> >when a message is posted, save that info into a flat txt file.
> >
> >So I actualy have 2 questions
> >one how do I get information from that flat file into an array?
>
> open(F, "some_flat_file") or die "can't open some_flat_file: $!";
> my @a = <F>;
>
> >two, Is that the best way to accomplish my task?
> >
>
> The best way to accomplish your task is to get something working
> and show it to the customer. Then fix what the customer does not
> like. Flat file is as good as anything else from that point of
> view.
>
> chris
> --
> This space intentionally left blank
------------------------------
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 5058
**************************************