[19149] in Perl-Users-Digest
Perl-Users Digest, Issue: 1344 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 20 18:10:39 2001
Date: Fri, 20 Jul 2001 15:10:18 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <995667017-v10-i1344@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 20 Jul 2001 Volume: 10 Number: 1344
Today's topics:
Re: Newbie: apologies for the daft message <monty@primenet.com>
Re: Newbie: apologies for the daft message <bowed_zombie_drone.spam.begone@zombie.co.uk>
Re: Newbie: apologies for the daft message (Tad McClellan)
Re: Newbie: apologies for the daft message (mc)
Query Filemaker through Perl <curtish@ourtownusa.net>
read csv <info@agoradesign.com>
Re: Redirecting STDERR <monty@primenet.com>
Re: Redirecting STDERR <ekulis@apple.com>
Re: Redirecting STDERR <stevea@wrq.com>
Regex help <napes@attglobal.net>
Re: Regex help <marshall@chezmarshall.com>
Re: Regex help <marshall@chezmarshall.com>
Re: Regex help <godzilla@stomp.stomp.tokyo>
Re: Regex help (mc)
Re: Regex help <napes@attglobal.net>
Re: Removing Tags <andras@mortgagestats.com>
Re: tab sperated line to named hash? (Tad McClellan)
Re: tab sperated line to named hash? <twanGEENSPAM@twansoft.com>
Win32::Setupsup question <eklein@whsun1.wh.whoi.edu>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 20 Jul 2001 15:14:08 GMT
From: Jim Monty <monty@primenet.com>
Subject: Re: Newbie: apologies for the daft message
Message-Id: <9j9hs0$ala$2@nnrp2.phx.gblx.net>
Noah <bowed_zombie_drone.spam.begone@zombie.co.uk> wrote:
> I'm a newbie - please be gentle with me...
Then let me gently tell you that you must eliminate the faux mot
"newbie" from your vocabulary unless you wish to remain one forever.
> I've inherited a Perl program to maintain & am learning
> the language on the fly.
>
> I have a question: one line of code includes this:
>
> m/\TEST/
>
> I know it's a pattern match, but what does the
> backslash indicate? I've had a look through my
> Perl books & have found that it would refer to
> a tab if it was \t, but doesn't mean that, I'm sure...
> I'm not sure what it does mean, though
Effectively, it means nothing. Since "T" isn't special, the backslash
escaping it is superfluous.
That expression is functionally the same as
m/TEST/
I suspect the backslash is a vestige of some use that *was* purposeful
before someone changed what was once there (say, perhaps, m/\$foo/)
to the pattern 'TEST'.
--
Jim Monty
monty@primenet.com
Tempe, Arizona USA
------------------------------
Date: Fri, 20 Jul 2001 16:15:28 +0100
From: "Noah" <bowed_zombie_drone.spam.begone@zombie.co.uk>
Subject: Re: Newbie: apologies for the daft message
Message-Id: <lWX57.23899$B5.2126017@monolith.news.easynet.net>
> Effectively, it means nothing. Since "T" isn't special, the backslash
> escaping it is superfluous.
>
> That expression is functionally the same as
>
> m/TEST/
>
> I suspect the backslash is a vestige of some use that *was* purposeful
> before someone changed what was once there (say, perhaps, m/\$foo/)
> to the pattern 'TEST'.
Ah... the light dawns...
Yes, that makes perfect sense - thanks very much indeed.
Noah
------------------------------
Date: Fri, 20 Jul 2001 10:26:58 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Newbie: apologies for the daft message
Message-Id: <slrn9lgfti.28f.tadmc@tadmc26.august.net>
Noah <bowed_zombie_drone.spam.begone@zombie.co.uk> wrote:
>I'm a newbie - please be gentle with me...
Please put the subject of your article in the Subject of your article.
You should not waste characters in your subject on experience level.
Subject: pattern matching
Subject: backslashes
Subject: what is \T in a regex?
It is impossible to tell what your article is about from the Subject
line you chose. Many people will skip reading it for that reason.
You should enable warnings when developing Perl programs.
>I've inherited a Perl program to maintain & am learning
>the language on the fly.
>
>I have a question: one line of code includes this:
>
>m/\TEST/
>
>I know it's a pattern match, but what does the
>backslash indicate?
It indicates nothing and generates a warning stating that it
indicates nothing. It will match the same strings as m/TEST/
perl itself will tell you about "suspicious looking" code, but you
have to ask it to help you:
#!/usr/bin/perl -w
>I'm not sure what it does mean, though
Since it means nothing, yet the original programmer included it,
I would be suspicious of the entire program. Looks like it was
not written well...
Good luck!
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 20 Jul 2001 17:53:28 GMT
From: nospam@home.com (mc)
Subject: Re: Newbie: apologies for the daft message
Message-Id: <3b586fbc.50596220@news>
On Fri, 20 Jul 2001 10:26:58 -0400, tadmc@augustmail.com (Tad
McClellan) wrote:
>Noah <bowed_zombie_drone.spam.begone@zombie.co.uk> wrote:
>
>>I'm a newbie - please be gentle with me...
>
>
>Please put the subject of your article in the Subject of your article.
>
>You should not waste characters in your subject on experience level.
>
> Subject: pattern matching
> Subject: backslashes
> Subject: what is \T in a regex?
>
>It is impossible to tell what your article is about from the Subject
>line you chose. Many people will skip reading it for that reason.
Yeah but we can all be certain that YOU'll read it! Who else
do we need to read all the newbie perl questions here??
mc
------------------------------
Date: Fri, 20 Jul 2001 14:28:15 -0500
From: "Curtis Hawthorne" <curtish@ourtownusa.net>
Subject: Query Filemaker through Perl
Message-Id: <xB%57.8002$kP1.1751@newsfeed.slurp.net>
I'm completely lost, can anyone give me an example script that will query a
Filemaker database using Perl? I am trying to connect to a Filemaker
database using DBD::ODBC on a windows machine. I can connect without any
errors, but none of my statements will work. What naming scheme does
Filemaker use for its databases and tables?
Thanks!
Curtis H.
------------------------------
Date: Fri, 20 Jul 2001 14:51:53 -0700
From: Agoradesign.com <info@agoradesign.com>
Subject: read csv
Message-Id: <ou9hlto8jvvb6pufmvgua0eva42d714apm@4ax.com>
I am a newbie in perl, I am doing a mailing list form, it can write in
a csv file correctly (I need this to imprt in outlook) put I cant make
the confirmation page with the new person confirmation in it, neither
make a reply auto email.
here is the code I put in the html file
<form method="GET" action="cgi-bin/readcsv.cgi">
<template>
<<nom>>
</template>
</form>
any other idea would help
thanks
dany@agoradesign.com
------------------------------
Date: 20 Jul 2001 15:59:44 GMT
From: Jim Monty <monty@primenet.com>
Subject: Re: Redirecting STDERR
Message-Id: <9j9khg$ala$3@nnrp2.phx.gblx.net>
Fred <f_dubru@yahoo.com> wrote:
> I am trying to redirect the errors generated by one script on win32. I use
> the following command:
>
> scriptname > out.txt 2>&1
>
> If the STDOUT is correctly redirected, none of the error messages are sent
> to the file.
>
> Any idea why??
Order of operation. Redirect stderr to stdout first, then stdout
to a file. For example:
C:\>type foo.pl
#!perl
print STDOUT "text to stdout\n";
print STDERR "text to stderr\n";
C:\>perl foo.pl
text to stdout
text to stderr
C:\>perl foo.pl 2>&1 1>foo.out
text to stderr
C:\>type foo.out
text to stdout
C:\>
No guarantees. Welcome to Microsoft Windows 3.1/95/98/ME/NT/2000/etc.
Good luck!
--
Jim Monty
monty@primenet.com
Tempe, Arizona USA
------------------------------
Date: Fri, 20 Jul 2001 11:20:27 -0700
From: Ed Kulis <ekulis@apple.com>
Subject: Re: Redirecting STDERR
Message-Id: <3B58766B.A706E81F@apple.com>
Hi,
I thought that it might be the order so I tried
ls * *kdkdk* > out.tmp 2>&1
on an AIX unix system.
but the error messages did end up in the file.
So, you might try
scriptname 2>&1 > out.txt
to see if it's a quirk in WIN32.
There's another possibility in that something with in you script is sending
something to STDERR which isn't redirected.
To redirect the perl error messages themselves, redirect STDERR in a BEGIN
block.
perl -e 'BEGIN { open STDERR ,">out.tmp"} ; xxxxprit "xxxxxx\n";'
/home/...ekulis> cat out.tmp
String found where operator expected at -e line 1, near "xxxxprit "xxxxxx\n""
(Do you need to predeclare xxxxprit?)
syntax error at -e line 1, near "xxxxprit "xxxxxx\n""
Execution of -e aborted due to compilation errors.
-ed
Fred wrote:
> Hi,
>
> I am trying to redirect the errors generated by one script on win32. I use
> the following command:
>
> scriptname > out.txt 2>&1
>
> If the STDOUT is correctly redirected, none of the error messages are sent
> to the file.
>
> Any idea why??
>
> Thanks for you time.
>
> Fred
------------------------------
Date: Fri, 20 Jul 2001 18:48:59 GMT
From: Steve Allan <stevea@wrq.com>
Subject: Re: Redirecting STDERR
Message-Id: <uelrbh1wv.fsf@wrq.com>
"Fred" <f_dubru@yahoo.com> writes:
>Hi,
>
>I am trying to redirect the errors generated by one script on win32. I use
>the following command:
>
> scriptname > out.txt 2>&1
>
>If the STDOUT is correctly redirected, none of the error messages are sent
>to the file.
>
>Any idea why??
I don't know why, but I experience the same behavior using
ActiveState's Perl. Oddly enough, it works correctly for me if I
invoke the interpreter directly,
% scriptname > out.txt 2>&1 # donesn't work
% perl scriptname > out.txt 2>&1 # works
See if that works for you.
--
-- Steve __
------------------------------
Date: Fri, 20 Jul 2001 13:15:09 -0400
From: Ed Napier <napes@attglobal.net>
Subject: Regex help
Message-Id: <3B58671D.259B2C9C@attglobal.net>
I'm trying to extract "running" from the html code below. My regex is
just not cutting it. Can someone help?
Thanks,
Ed
my $txt = '<html> <head> <title>LCF Daemon</title></title> <!<body
BGCOLOR="ffffff" TEXT="000000"> <h2 align=center><center> TMA Daemon
Status Page </center></h2> <pre> </pre> <FONT SIZE="+1">
Version : <FONT color="#ff0000">93</font><br>Interp :
<FONT color="#ff0000">Windows NT</font><br> Endpoint Label : <FONT
color="#ff0000">b00c04fd0223e</font><br> Hostname : <FONT
color="#ff0000">b00c04fd0223e</font><br> NIC Address : <FONT
color="#ff0000"
>0.0.0.0+9495</font><br> Gateway Address : <FONT
color="#ff0000">uswrdntsg08s.bankamerica.com
(171.177.193.248+9494)</font><br> Status : <FONT
color="#ff0000">running</font><br> Last Restart : <FONT
color="#ff0000">Jul 20 12:25:29 Eastern Daylight Time</FONT><br> </FONT>
<pre> </pre> <hr> <FONT SIZE="+1"> Operations: <STRONG> <P> <UL
TYPE=SQUARE>
<LI><A HREF="logfile">Show Logfile</A><BR> <LI><A HREF="methcache">List
Method Cache</A><BR> <LI><A HREF="stats">Display Usage
Statistics</A><BR> <LI><A HREF="config">Show Config Settings</A><BR>
<LI><A HREF="tlog">Show Trace Log</A><BR> <LI><A HREF="addr">Network
Addresses Configuration</A><BR> </UL> </FONT> </STRONG> </html>
<!END_PAGE>';
$txt =~ /Status\s*\:\s*<[\w\s]+>(\w+)/g;
#$txt =~ /(<[\w\s]+>)/;
$status = $1;
print "Status: $status\n";
$txt =~ /Status\: [^<]*/; print("$&\n");
------------------------------
Date: Fri, 20 Jul 2001 18:02:25 GMT
From: David Marshall <marshall@chezmarshall.com>
Subject: Re: Regex help
Message-Id: <MPG.15c23c24ca541630989686@news.earthlink.net>
This was your regex: /Status\s*\:\s*<[\w\s]+>(\w+)/g
It matches up to 'Status\s*:\s*<[\w\s]+' but fails on the >, because some
of the stuff in the FONT tag after "Status" is neither \s nor \w.
Try /Status\s*:[^<]*<[^>]+>([^<]+)/.
($status) = ($txt =~ /Status\s*:[^<]*<[^>]+>([^<]+)/);
print "Status: $status\n";
$ perl foo.pl
Status: running
In article <3B58671D.259B2C9C@attglobal.net>, napes@attglobal.net says...
> I'm trying to extract "running" from the html code below. My regex is
> just not cutting it. Can someone help?
>
> Thanks,
> Ed
>
> my $txt = '<html> <head> <title>LCF Daemon</title></title> <!<body
> BGCOLOR="ffffff" TEXT="000000"> <h2 align=center><center> TMA Daemon
> Status Page </center></h2> <pre> </pre> <FONT SIZE="+1">
> Version : <FONT color="#ff0000">93</font><br>Interp :
> <FONT color="#ff0000">Windows NT</font><br> Endpoint Label : <FONT
> color="#ff0000">b00c04fd0223e</font><br> Hostname : <FONT
> color="#ff0000">b00c04fd0223e</font><br> NIC Address : <FONT
> color="#ff0000"
> >0.0.0.0+9495</font><br> Gateway Address : <FONT
> color="#ff0000">uswrdntsg08s.bankamerica.com
> (171.177.193.248+9494)</font><br> Status : <FONT
> color="#ff0000">running</font><br> Last Restart : <FONT
> color="#ff0000">Jul 20 12:25:29 Eastern Daylight Time</FONT><br> </FONT>
> <pre> </pre> <hr> <FONT SIZE="+1"> Operations: <STRONG> <P> <UL
> TYPE=SQUARE>
> <LI><A HREF="logfile">Show Logfile</A><BR> <LI><A HREF="methcache">List
> Method Cache</A><BR> <LI><A HREF="stats">Display Usage
> Statistics</A><BR> <LI><A HREF="config">Show Config Settings</A><BR>
> <LI><A HREF="tlog">Show Trace Log</A><BR> <LI><A HREF="addr">Network
> Addresses Configuration</A><BR> </UL> </FONT> </STRONG> </html>
> <!END_PAGE>';
>
> $txt =~ /Status\s*\:\s*<[\w\s]+>(\w+)/g;
> #$txt =~ /(<[\w\s]+>)/;
> $status = $1;
> print "Status: $status\n";
> $txt =~ /Status\: [^<]*/; print("$&\n");
>
>
>
>
------------------------------
Date: Fri, 20 Jul 2001 18:15:30 GMT
From: David Marshall <marshall@chezmarshall.com>
Subject: Re: Regex help
Message-Id: <MPG.15c23f43d27ca7fc989687@news.earthlink.net>
I should also add that the fun new-school non-greedy way to do this would
be to use:
$txt =~ /Status\s*:.*?>(.*?)</s;
In article <MPG.15c23c24ca541630989686@news.earthlink.net>,
marshall@chezmarshall.com says...
> This was your regex: /Status\s*\:\s*<[\w\s]+>(\w+)/g
>
> It matches up to 'Status\s*:\s*<[\w\s]+' but fails on the >, because some
> of the stuff in the FONT tag after "Status" is neither \s nor \w.
>
> Try /Status\s*:[^<]*<[^>]+>([^<]+)/.
>
> ($status) = ($txt =~ /Status\s*:[^<]*<[^>]+>([^<]+)/);
> print "Status: $status\n";
>
> $ perl foo.pl
> Status: running
>
> In article <3B58671D.259B2C9C@attglobal.net>, napes@attglobal.net says...
> > I'm trying to extract "running" from the html code below. My regex is
> > just not cutting it. Can someone help?
> >
> > Thanks,
> > Ed
> >
> > my $txt = '<html> <head> <title>LCF Daemon</title></title> <!<body
> > BGCOLOR="ffffff" TEXT="000000"> <h2 align=center><center> TMA Daemon
> > Status Page </center></h2> <pre> </pre> <FONT SIZE="+1">
> > Version : <FONT color="#ff0000">93</font><br>Interp :
> > <FONT color="#ff0000">Windows NT</font><br> Endpoint Label : <FONT
> > color="#ff0000">b00c04fd0223e</font><br> Hostname : <FONT
> > color="#ff0000">b00c04fd0223e</font><br> NIC Address : <FONT
> > color="#ff0000"
> > >0.0.0.0+9495</font><br> Gateway Address : <FONT
> > color="#ff0000">uswrdntsg08s.bankamerica.com
> > (171.177.193.248+9494)</font><br> Status : <FONT
> > color="#ff0000">running</font><br> Last Restart : <FONT
> > color="#ff0000">Jul 20 12:25:29 Eastern Daylight Time</FONT><br> </FONT>
> > <pre> </pre> <hr> <FONT SIZE="+1"> Operations: <STRONG> <P> <UL
> > TYPE=SQUARE>
> > <LI><A HREF="logfile">Show Logfile</A><BR> <LI><A HREF="methcache">List
> > Method Cache</A><BR> <LI><A HREF="stats">Display Usage
> > Statistics</A><BR> <LI><A HREF="config">Show Config Settings</A><BR>
> > <LI><A HREF="tlog">Show Trace Log</A><BR> <LI><A HREF="addr">Network
> > Addresses Configuration</A><BR> </UL> </FONT> </STRONG> </html>
> > <!END_PAGE>';
> >
> > $txt =~ /Status\s*\:\s*<[\w\s]+>(\w+)/g;
> > #$txt =~ /(<[\w\s]+>)/;
> > $status = $1;
> > print "Status: $status\n";
> > $txt =~ /Status\: [^<]*/; print("$&\n");
> >
> >
> >
------------------------------
Date: Fri, 20 Jul 2001 10:23:08 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Regex help
Message-Id: <3B5868FC.39B7159D@stomp.stomp.tokyo>
Ed Napier wrote:
(snipped)
> I'm trying to extract "running" from the html code below.
> My regex is just not cutting it.
> Can someone help?
Yes.
if (index ($txt, "running") > -1)
{ print "Status: Running"; }
else
{ print "Status: Unknown - Not Running"; }
Godzilla!
------------------------------
Date: Fri, 20 Jul 2001 18:06:52 GMT
From: nospam@home.com (mc)
Subject: Re: Regex help
Message-Id: <3b5870a2.50826284@news>
On Fri, 20 Jul 2001 13:15:09 -0400, Ed Napier <napes@attglobal.net>
wrote:
>I'm trying to extract "running" from the html code below. My regex is
>just not cutting it. Can someone help?
>
>Thanks,
>Ed
>
>my $txt = '<html> <head> <title>LCF Daemon</title></title> <!<body
>BGCOLOR="ffffff" TEXT="000000"> <h2 align=center><center> TMA Daemon
>Status Page </center></h2> <pre> </pre> <FONT SIZE="+1">
>Version : <FONT color="#ff0000">93</font><br>Interp :
><FONT color="#ff0000">Windows NT</font><br> Endpoint Label : <FONT
>color="#ff0000">b00c04fd0223e</font><br> Hostname : <FONT
>color="#ff0000">b00c04fd0223e</font><br> NIC Address : <FONT
>color="#ff0000"
>>0.0.0.0+9495</font><br> Gateway Address : <FONT
>color="#ff0000">uswrdntsg08s.bankamerica.com
>(171.177.193.248+9494)</font><br> Status : <FONT
>color="#ff0000">running</font><br> Last Restart : <FONT
>color="#ff0000">Jul 20 12:25:29 Eastern Daylight Time</FONT><br> </FONT>
><pre> </pre> <hr> <FONT SIZE="+1"> Operations: <STRONG> <P> <UL
>TYPE=SQUARE>
> <LI><A HREF="logfile">Show Logfile</A><BR> <LI><A HREF="methcache">List
>Method Cache</A><BR> <LI><A HREF="stats">Display Usage
>Statistics</A><BR> <LI><A HREF="config">Show Config Settings</A><BR>
><LI><A HREF="tlog">Show Trace Log</A><BR> <LI><A HREF="addr">Network
>Addresses Configuration</A><BR> </UL> </FONT> </STRONG> </html>
><!END_PAGE>';
>
> $txt =~ /Status\s*\:\s*<[\w\s]+>(\w+)/g;
> #$txt =~ /(<[\w\s]+>)/;
> $status = $1;
>print "Status: $status\n";
> $txt =~ /Status\: [^<]*/; print("$&\n");
The main problem is that your <FONT > tag
contains some punctuation characters. How about:
$txt =~ /Status\s*\:\s*<[\w\s"=#]+?>(\w+)/g;
Or consider:
$txt =~ /Status\s*\:\s*<.*?>(\w+)/g;
mc
------------------------------
Date: Fri, 20 Jul 2001 14:58:41 -0400
From: Ed Napier <napes@attglobal.net>
Subject: Re: Regex help
Message-Id: <3B587F60.F77B297E@attglobal.net>
Thanks David. You really helped me out.
David Marshall wrote:
> This was your regex: /Status\s*\:\s*<[\w\s]+>(\w+)/g
>
> It matches up to 'Status\s*:\s*<[\w\s]+' but fails on the >, because some
> of the stuff in the FONT tag after "Status" is neither \s nor \w.
>
> Try /Status\s*:[^<]*<[^>]+>([^<]+)/.
>
> ($status) = ($txt =~ /Status\s*:[^<]*<[^>]+>([^<]+)/);
> print "Status: $status\n";
>
> $ perl foo.pl
> Status: running
>
------------------------------
Date: Fri, 20 Jul 2001 12:29:50 -0400
From: Andras Malatinszky <andras@mortgagestats.com>
Subject: Re: Removing Tags
Message-Id: <3B585C7E.A8647CDA@mortgagestats.com>
Lee Osborne wrote:
> Hi all,
>
> Does someone have some code that removes HTML tags from a string? I don't
> want to use a module from cpan. I can use the RE:
>
> /(<[^>]>)/g
>
> To grab any tag available. I have tried to write a recursive aglorithm to
> grab sub tags when a tag was found but failed miserably (pride swallowed
> here!).
>
> An algorithm or code would be ideal.
>
> Any suggestions or consideration would be appreciated,
>
> Thanks in advance,
>
> Lee.
This is a FAQ. See "How do I remove HTML from a string?" in perlfaq9
(available on the web at http://language.perl.com/newdocs/pod/perlfaq9.html)
------------------------------
Date: Fri, 20 Jul 2001 10:33:44 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: tab sperated line to named hash?
Message-Id: <slrn9lgga8.2al.tadmc@tadmc26.august.net>
Twan Kogels <twanGEENSPAM@twansoft.com> wrote:
>On Fri, 20 Jul 2001 09:44:15 -0400, tadmc@augustmail.com (Tad
>McClellan) wrote:
>
>>Twan Kogels <twanGEENSPAM@twansoft.com> wrote:
>>>On Thu, 19 Jul 2001 22:36:13 -0600, pt
>>><mnemotronic@mind\no-spam/spring.com> wrote:
>>
>>
>>>Thanks! I already have implented your idea. I made a lookup hash:
>>>
>>>#lookup hash
>>>%propindex=(
>>>"forum_title", 0,
>>>"bg_header", 1,
>>You do not need the indexes if you use an array instead of a hash.
>
>But i need to know the index of a property in a array, otherwise i
^^^^^^^^^^^^
>cannot get the value of the array item.
Did you see my followup?
You do not need to type 200 index numbers using my approach.
You do not need to know the index number with that approach either.
>but to fill the hash i needed to write:
^^^^^^^^
>@data=split("\t", $dataline);
>$forumprop{'forum_title'}=$data[0];
>(200 times per property)
^^^^^^^^^
I have shown code where you do NOT need to write all of that.
>Now i have a lookup hash:
[snip]
>and a array:
>this way i avoid 200 assignments.
My way avoids 200 assignments too.
I see no benefit of this approach compared to mine.
What is objectionable about the hash slice method that I have shown?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 20 Jul 2001 19:03:26 +0200
From: Twan Kogels <twanGEENSPAM@twansoft.com>
Subject: Re: tab sperated line to named hash?
Message-Id: <knogltoa4m95sctn8r091p30k7152u3de0@4ax.com>
On Fri, 20 Jul 2001 10:33:44 -0400, tadmc@augustmail.com (Tad
McClellan) wrote:
>[snip]
>>and a array:
>
>>this way i avoid 200 assignments.
>
>
>My way avoids 200 assignments too.
>
>I see no benefit of this approach compared to mine.
>
>What is objectionable about the hash slice method that I have shown?
I thought that the reply came from the poster "pt<>", when i wrote my
reply i used his suggestion as basis for my reply.
I looked again to your first reply and i must agree that your methode
is also possible and als doesn't need 200 assigments. Sorry for the
trouble.
Twan
--
W.I.E. , wie is er op je website?:
http://www.twansoft.com/wie/
------------------------------
Date: Fri, 20 Jul 2001 13:40:57 -0400
From: Edgar Kleindinst <eklein@whsun1.wh.whoi.edu>
Subject: Win32::Setupsup question
Message-Id: <3B586D28.68CDC157@whsun1.wh.whoi.edu>
I'm using Win32::Setupsup to automate installations of often used
programs and have come upon a simple task seems
impossible to do in Setupsup. All I want to do is send a simple pathname
containing a backslash "\" to a text window. I am using this syntax....
Win32::Setupsup::SendKeys($window,"P:\\VIRUS\\MCAFEE\\NEW-DAT",undef);
All that arrives in the text window is ....P: apparently treating the
rest as Setupsup special commands (like \\TAB\\) which are surrounded by
\\ \\ and, since they don't match any commands, it just ignores them. I
have tried single quotes '\\', 3 backslashes \\\ ALT+ NUM9 NUM2 ALT-
trying to send the ascii numeric 92 for the "\" character... all a no
go.
Question: How do you specify a string with backslashes in it in
Setupsup's SendKeys function?
Much thanks,
Edgar Kleindinst
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.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 V10 Issue 1344
***************************************