[15812] in Perl-Users-Digest
Perl-Users Digest, Issue: 3225 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 31 21:10:46 2000
Date: Wed, 31 May 2000 18: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: <959821818-v9-i3225@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 31 May 2000 Volume: 9 Number: 3225
Today's topics:
last <todd@mrnoitall.com>
Re: last <tina@streetmail.com>
Re: last <bmb@ginger.libs.uga.edu>
Re: last (Abigail)
Re: Looking for clever code bumming <samay1NOsaSPAM@hotmail.com.invalid>
Re: Looking for clever code bumming <peter@lberghold.net>
native file renaming function ? <byteshifter@shifted-bytes.de>
Re: native file renaming function ? <lauren_smith13@hotmail.com>
Re: native file renaming function ? <rrauer@mitre.org>
Re: native file renaming function ? <abe@ztreet.demon.nl>
Re: native file renaming function ? <peter@lberghold.net>
patten matching <Kumanan@uni.de>
Re: Perl and wxWindows jim@buttafuoco.org
Re: Perl IDE for Win32? (konstantine a. dallas)
Re: PERL JOBS =?iso-8859-1?Q?=28=A340k+=29?= (David H. Adler)
Re: Perl unusable as a programming language <dan@tuatha.sidhe.org>
Re: Perl unusable as a programming language (Malcolm Dew-Jones)
Re: Perl unusable as a programming language <kaleja@estarcion.com>
Problems with Tree::Trie <mdemello@pound.ruf.rice.edu>
Re: Secure (enough) dayta encryption and decryption (jason)
Re: Secure (enough) dayta encryption and decryption (jason)
Seeking help with simple script for submitting a scuba <jmooreNOjmSPAM@divebums.com.invalid>
Re: Seeking help with simple script for submitting a sc (brian d foy)
Tr vs. tr !@#@!#$@#% <tzadikv@my-deja.com>
Re: Tr vs. tr !@#@!#$@#% <lauren_smith13@hotmail.com>
Re: Tr vs. tr !@#@!#$@#% (brian d foy)
Re: Tr vs. tr !@#@!#$@#% (Brandon Metcalf)
What is this? <tad@cyberconceptscorp.com>
Re: What is this? <lauren_smith13@hotmail.com>
Re: Why this matching/replace is not working? (Abigail)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 31 May 2000 16:22:18 -0600
From: Todd Anderson <todd@mrnoitall.com>
Subject: last
Message-Id: <39358FFE.42131887@mrnoitall.com>
Dear Sirs and or Madams,
I need to determine if an item is the "last" item in an array as the
print command is different for this item. Any ideas?
Thanks for your help in advance.
foreach $name (@array ) {
print qq~"$name", ~;
if ($name eq "last"){
print qq~"$name"); ~;
}
}
------------------------------
Date: 31 May 2000 22:25:59 GMT
From: Tina Mueller <tina@streetmail.com>
Subject: Re: last
Message-Id: <8h43hn$2ajuf$3@fu-berlin.de>
hi,
Todd Anderson <todd@mrnoitall.com> wrote:
> I need to determine if an item is the "last" item in an array as the
> print command is different for this item. Any ideas?
> Thanks for your help in advance.
> foreach $name (@array ) {
> print qq~"$name", ~;
> if ($name eq "last"){
> print qq~"$name"); ~;
> }
> }
well, this won't work, I guess. or is the last
item really "last"?
if not, why not just print out the array
with commas in between?
print (join ", ", @array);
tina
--
http://www.tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \ _,_\ __/\ __/_| /__/ perception
------------------------------
Date: Wed, 31 May 2000 18:31:51 -0400
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: last
Message-Id: <Pine.A41.4.21.0005311827270.13070-100000@ginger.libs.uga.edu>
On Wed, 31 May 2000, Todd Anderson wrote:
> Dear Sirs and or Madams,
> I need to determine if an item is the "last" item in an array as the
> print command is different for this item. Any ideas?
> Thanks for your help in advance.
>
> foreach $name (@array ) {
> print qq~"$name", ~;
> if ($name eq "last"){
> print qq~"$name"); ~;
> }
> }
Two thoughts:
- use a for loop, i.e. "for( my $i = 0; $i <= $#array; ++$i ) ..."
- use join, i.e. print join( ", ", @array );
--
Brad
------------------------------
Date: 1 Jun 2000 00:07:45 GMT
From: abigail@arena-i.com (Abigail)
Subject: Re: last
Message-Id: <8h49gh$5et$2@news.panix.com>
On Wed, 31 May 2000 16:22:18 -0600, Todd Anderson <todd@mrnoitall.com> wrote:
++ Dear Sirs and or Madams,
++ I need to determine if an item is the "last" item in an array as the
++ print command is different for this item. Any ideas?
++ Thanks for your help in advance.
++
++ foreach $name (@array ) {
++ print qq~"$name", ~;
++ if ($name eq "last"){
++ print qq~"$name"); ~;
++ }
++ }
What a horrible indentation! And I don't think you mean you want
to print the last element twice.
Try this:
{local ($", $\) = ('", "', '); ');
print qq {"@array"};
}
Abigail
------------------------------
Date: Wed, 31 May 2000 15:18:15 -0700
From: Samay <samay1NOsaSPAM@hotmail.com.invalid>
Subject: Re: Looking for clever code bumming
Message-Id: <0298c2fb.9afd659e@usw-ex0104-031.remarq.com>
($a,$b) = $_? ($sx,$sy):($sy,$sx);
$string.= $p->{grid}->[$a]->[$b];
push(@coord, [ $a, $b ]) ;
* 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: Wed, 31 May 2000 23:56:54 GMT
From: Peter L. Berghold <peter@lberghold.net>
Subject: Re: Looking for clever code bumming
Message-Id: <aFhZ4.103541$R4.602111@news1.rdc1.nj.home.com>
In article <0OfZ4.96182$h01.690102@news1.rdc1.mi.home.com>, clintp@geeksalad.org (Clinton A. Pierce) wrote:
> if ($_) {
> $string.= $p->{grid}->[$sx]->[$sy];
> push(@coord, [ $sx, $sy ]) ;
> } else {
> $string.=$p->{grid}->[$sy]->[$sx];
> push(@coord, [ $sy, $sx ]);
> }
>
How about:
$string.= $p->{grid}->[$sx]->[$sy];
($_ ? push(@coord,[$sx , $sy]) : push(@coord,[$sy,$sx]));
--
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Peter L. Berghold http://www.berghold.net
Peter@Berghold.Net Linux Bigot at Large
"Linux renders ships... Windows NT renders ships useless..."
------------------------------
Date: Thu, 01 Jun 2000 00:56:47 +0200
From: Michael Agbaglo <byteshifter@shifted-bytes.de>
Subject: native file renaming function ?
Message-Id: <393598AF.9D15CCBF@shifted-bytes.de>
does such a thing exist ?
------------------------------
Date: Wed, 31 May 2000 16:05:08 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: native file renaming function ?
Message-Id: <8h45t5$o2b$1@brokaw.wa.com>
Michael Agbaglo <byteshifter@shifted-bytes.de> wrote in message
news:393598AF.9D15CCBF@shifted-bytes.de...
> does such a thing exist ?
Like 'rename()'?
perldoc -f rename
But I'm not sure I understand the question.
Lauren
------------------------------
Date: Wed, 31 May 2000 16:34:01 -0700
From: Ron Auer <rrauer@mitre.org>
Subject: Re: native file renaming function ?
Message-Id: <3935A169.76CE9685@mitre.org>
I might not understand your question, but if you are asking if you can
rename a native file, use rename. See perldoc -f rename.
rename oldname, newname
Ron
Michael Agbaglo wrote:
>
> does such a thing exist ?
------------------------------
Date: Thu, 01 Jun 2000 01:58:18 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: native file renaming function ?
Message-Id: <2f9bjsk0m2ih4cdlah45n7l7v8v33hll53@4ax.com>
On Thu, 01 Jun 2000 00:56:47 +0200, Michael Agbaglo
<byteshifter@shifted-bytes.de> wrote:
> does such a thing exist ?
I do not understand your question.
Were there some things you didn't understand when you read
perldoc -q rename
and
perldoc -f rename
--
Good luck,
Abe
------------------------------
Date: Thu, 01 Jun 2000 00:03:10 GMT
From: Peter L. Berghold <peter@lberghold.net>
Subject: Re: native file renaming function ?
Message-Id: <2LhZ4.103567$R4.601038@news1.rdc1.nj.home.com>
In article <393598AF.9D15CCBF@shifted-bytes.de>, Michael Agbaglo <byteshifter@shifted-bytes.de> wrote:
> does such a thing exist ?
First off: perldoc -f rename
Secondly, I would actually advise you write a "safe" rename function that verifies that the file was renamed.
I got burned by using the rename function.
--
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Peter L. Berghold http://www.berghold.net
Peter@Berghold.Net Linux Bigot at Large
"Linux renders ships... Windows NT renders ships useless..."
------------------------------
Date: Thu, 1 Jun 2000 01:53:42 +0200
From: "Kumanan" <Kumanan@uni.de>
Subject: patten matching
Message-Id: <8h48ku$gv5$1@piggy.rz.tu-ilmenau.de>
hi,
i want to get the email address from a file (url).
the file look like somethings...
fdf fd dfd df d fd d d d d web@dot.com dff fs fd ff sf f f
dsf sdf df fds fd fdsf asdf@dff.com f ffsdf
so on... (its a html file)
who to write the patten match for this, so that the emails are put in to a
variable
$mail = ~/ / /;
kumanan
kumanan@tamilline.com
------------------------------
Date: Thu, 01 Jun 2000 00:41:04 GMT
From: jim@buttafuoco.org
Subject: Re: Perl and wxWindows
Message-Id: <sjbc90th5pj37@corp.supernews.com>
I wrote a wxperl 2 years ago, but gave up and switched to tkperl instead. I don't know if it will compile
with the current versions of perl and wxwindows. If you are interested let me know
Jim
jim@buttafuoco.org
In comp.lang.perl.modules Laurent Marechal <l.marechal@chello.nl> wrote:
: Hello,
: I apologize for the cross-posting.
: I was looking for a portable GUI system (unix/win32, I would like something
: else than Tk). and I found wxWindows (www.wxwindows.org) There is a
: 'module'
: that allow you to use it from Python. There is also a reference to a Perl
: module to use it, but I'm unable to find it.
: I anyone know where to find it or know if it already exist ?
: Thanks for your help
: Laurent
--
****************************************************************************
Jim Buttafuoco Unix/Linux/Perl Consultant
Perl Hacker email: jim@buttafuoco.net
Linux Fan web: http://www.buttafuoco.net
****************************************************************************
------------------------------
Date: 31 May 2000 22:56:53 GMT
From: kdallas@ix.netcom.com (konstantine a. dallas)
Subject: Re: Perl IDE for Win32?
Message-Id: <8h45bl$vvd$1@slb7.atl.mindspring.net>
Try Codemagic. You can get it at http://www.petes-place.com/ .
Konstantine
In article <8gsjf7$iab$1@nnrp1.deja.com>, osiris@mindless.com says...
>
>Hi All,
>I know this must have hashed over more times than *replace with
>something well hashed over* but has anyone got any recommendations for
>a solid Perl IDE under Win32? Preferably it would have syntax coloring
>and integrated FTP support (with symlink support). TIA.
>
>Matt.
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
------------------------------
Date: 31 May 2000 23:33:04 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: PERL JOBS =?iso-8859-1?Q?=28=A340k+=29?=
Message-Id: <slrn8jb89g.9lt.dha@panix6.panix.com>
On Wed, 31 May 2000 20:27:07 +0100, Ben Hobbs <Mail@Web-Recruit.co.uk> wrote:
>Web-Recruit specialise in Internet Jobs for Perl, Apache and UNIX positions.
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently
to "news.announce.newusers", you might have already known this. :)
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
There is a Perl Jobs Announce list that may be more helpful to you. See
<http://www.pm.org/mailing_lists.shtml> for details.
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"Do not look at the cursor! Look where the cursor points!"
- Chip Salzenberg
------------------------------
Date: Wed, 31 May 2000 18:55:05 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Perl unusable as a programming language
Message-Id: <dedZ4.98599$hT2.402102@news1.rdc1.ct.home.com>
In article <39340f0e@news.victoria.tc.ca>,
yf110@victoria.tc.ca (Malcolm Dew-Jones) writes:
>Dan Sugalski (dan@tuatha.sidhe.org) wrote:
>: Because of some of the oddities of perl, accessing a match variable gets
>: you the value of the variable at the time you use it. So if you do this:
>
>: $bar = "abc";
>: $bar =~ /(b)/;
>: foo($1);
>
>: sub foo {
>: "abc" =~ /(c)/;
>: my $bar = shift;
>: print $bar, "\n";
>: }
>
>: it prints c, because $1 (which you unshifted off the parameter list) was c
>: at that point because of the regex match.
>
>Perhaps its just me, but that one doesn't seem that bizarre. Perl
>variables are passed by reference, and your example (implicitly) reuses a
>global variable before you make a copy of its original value.
$1's not global for one thing, but more importantly if it got localized
the way you'd think it did (and the way it mostly does) the pass by
reference ought to get the pre-localized version of $1, which it doesn't.
Try this fun bit with $1 and recursion:
sub foo {
my $thing = shift;
$thing =~ s/(.)$//;
foo($thing) if $thing;
print "$1\n";
}
foo("Hi there!");
What do you think it'll print?
Dan
------------------------------
Date: 31 May 2000 10:49:37 -0800
From: yf110@victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: Perl unusable as a programming language
Message-Id: <393550b1@news.victoria.tc.ca>
Ariel Scolnicov (ariels@compugen.co.il) wrote:
: However, I'm at a loss to explain this:
: DB<13> sub foo { $_[0] = 42 }
: DB<14> $x = 10
: DB<15> x foo($x+1)
: 0 42
: DB<16> x $x
: 0 10
sub foo { $_[0]=42 }
$x=10;
foo($x+1);
print "$x\n"; # prints 10
foo($x++);
print "$x\n"; # prints 11
foo(++$x);
print "$x\n"; # prints 42
$x+1 -> the parameter being passed to foo is not $x, but "something" with
the value 11. That "something" is set to 42, but $x is left alone
$x++ -> this is the interesting case. I can see what is happening ($x is
in a state of flux, so a copy is made so the ++ can complete later), but
whether this is the "correct" behaviour is, I guess the point of this
thread.
++$x -> $x is incremented first. $x is now in a "static" state , and can
thereofre be the actual thing passed (by reference) to foo, and hence $x
is what gets incremented.
------------------------------
Date: Wed, 31 May 2000 11:55:24 -0700
From: Russell Bornschlegel <kaleja@estarcion.com>
Subject: Re: Perl unusable as a programming language
Message-Id: <3935601C.1EA54797@estarcion.com>
Dave Cross wrote:
>
> On Tue, 30 May 2000 10:39:22 -0700, Russell Bornschlegel
> <kaleja@estarcion.com> wrote:
>
> >I would rather that Perl's competition be, for example, Python, and not
> >Microsoft Visual Perl++.
> >
> >*shudder*
>
> Do you mean something like this?
>
> <http://www.activestate.com/Corporate/Media_Center/News/Press959117519.html>
I'll be eating my words now, thanks.
So, uh, the current versions of Active Perl aren't irredeemably tainted, are
they? I'd hate to have to burn all three computers I've installed it on...
-Russell B
------------------------------
Date: 31 May 2000 22:15:21 GMT
From: Martin Julian DeMello <mdemello@pound.ruf.rice.edu>
Subject: Problems with Tree::Trie
Message-Id: <8h42tp$jlv$1@joe.rice.edu>
Trying to add a list to a trie produces a stream of warnings:
Use of uninitialized value in hash element at
/usr/lib/perl5/site_perl/5.6.0/Tree/Trie.pm line 93.
Also, the trie seems to be including unnecessary substrings, and doing so at
random.
Being a complete newbie to perl I'm extremely reluctant to try to debug the
module itself :) Are there any known issues, or am I just doing something
wrong? Code follows.
#!/usr/bin/perl -w
use strict;
use Tree::Trie;
use File::Find;
my @filelist; # flat list of pathnames
my %filenames; # pathnames bucket hashed on filename
sub makeTables
{
my $full = $File::Find::name;
my $file = $_;
push @filelist, $full; # complete path + filename
push @{$filenames{$file}}, $full; # just the filename, for searches
}
find (\&makeTables,'/etc/');
my ($fileTrie) = new Tree::Trie;
for (keys %filenames)
{
$fileTrie->add($_);
}
--
Martin DeMello
------------------------------
Date: Wed, 31 May 2000 23:25:18 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Secure (enough) dayta encryption and decryption
Message-Id: <MPG.13a03c83d0c486769896fc@news>
Luis E. Rodriguez writes ..
>Problem is that transactions are going to be handled in batch form (as in
>monthly billing) and users will provide their card number once and then when
>billing time arrives the number is used for billing the customers, all of
>them in one operation and without customer intervention. One-way encryption
>won't work. I might be mistaken but the way I see it, one-way encryption
>only works for authentication purposes.
yeah .. you're right .. this monthly billing cycle sort of thing is the
other 10% .. still - you're better off asking in a security newsgroup
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Wed, 31 May 2000 23:28:48 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Secure (enough) dayta encryption and decryption
Message-Id: <MPG.13a03d546860758c9896fd@news>
Luis E. Rodriguez writes ..
>
>jason wrote in message ...
>>>HAHAHAHAAAAAA!!! ROTFLMAO!!!
>>>
>>>Nothing personal, but that's hilarious. Encrypted data that your can't
>>>decode isn't of any value...except in tales from the crypt.
>>
>>oh how wrong you are .. credit card numbers are a perfect example of
>>where a one-way encryption algorithm is useful
>
>
>The remark looked out of place for me because I use one-way encryption a lot
>for password protection. But I didn't think it was worth explaining.
yeah .. I also use it for credit card storage .. so that if a customer
queries a charge on their card I'm able to encrypt their number (when
they call) and find it in my transaction log and give them more details
about their purchase
I reckon that 90% of credit card storage is done for that reason (ie.
one off purchases that need to be kept for reference) .. obviously the
regular billing situation that you've got is different
but there are a lot of things to take into account .. like if the one
key is used for all numbers - then it becomes REALLY worthwhile spending
the time to crack that key .. that's why I pointed you to a security
newsgroup
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Wed, 31 May 2000 16:40:35 -0700
From: John H. Moore <jmooreNOjmSPAM@divebums.com.invalid>
Subject: Seeking help with simple script for submitting a scuba dive report
Message-Id: <1dead0b7.7d966339@usw-ex0101-005.remarq.com>
I'm not a Perl programmer, although I'm usually pretty good at
taking a template and customizing it. However... I've done
something wrong this time...
I use the guestbook script from Matt's Script Archive on several
websites. My main website is a non-commercial site with lots of
information about scuba diving in San Diego. There's a current
dive conditions reports section, where I put my dive reports and
ask others to e-mail me the conditions they encountered, which I
then manually copy to the website. Recently, it occured to me
that an automatically updating dive report form was very similar
to a guestbook. So I took the guestbook script and html pages
and tried to modify them to do my dive report auto update. No
dice. The error logs keeps saying "Premature end of script
headers: /.../cgi-bin/reportbook.pl"
If you're willing to help me find my error and get this thing
working, please e-mail me at spam@divebums.com (no joke) and
I'll send you the script and links to the html pages.
Thanks much,
John H. Moore
San Diego, California
http://www.divebums.com/
* 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: Wed, 31 May 2000 20:11:28 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Seeking help with simple script for submitting a scuba dive report
Message-Id: <brian-ya02408000R3105002011280001@news.panix.com>
In article <1dead0b7.7d966339@usw-ex0101-005.remarq.com>, John H. Moore <jmooreNOjmSPAM@divebums.com.invalid> posted:
> I'm not a Perl programmer, although I'm usually pretty good at
> taking a template and customizing it. However... I've done
> something wrong this time...
tell me what you want, and i'll write it for you for free. of
course, i might show up in San Diego looking for a dive
buddy some day ;)
btw, anyone want to dive Monterey Bay during the Perl Conference?
i'm looking to make lots and lots of dives the week before and
during the conference.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>
------------------------------
Date: Wed, 31 May 2000 22:58:09 GMT
From: Tzadik Vanderhoof <tzadikv@my-deja.com>
Subject: Tr vs. tr !@#@!#$@#%
Message-Id: <8h45dt$tu7$1@nnrp1.deja.com>
ARRRRGGGGGGHHHHHH!!!!!!
SOMEONE has GOT to do SOMETHING about "Tr" vs. "tr" !!!!!!!
I just spent half an hour puzzling over the extremely misleading error
messages that Perl gives you, directing you to the WRONG LINE, when you
use "tr" and you mean "Tr". AND THE EXACT SAME THING HAPPENNED TO ME
A FEW MONTHS AGO!!!! Now my wife is going to give me the silent
treatment because I'm going to get home late!!!!
----------------------------------------
S T O P T H E I N S A N I T Y ! ! !
----------------------------------------
--
Tzadik
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 31 May 2000 16:26:13 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: Tr vs. tr !@#@!#$@#%
Message-Id: <8h474m$lgf$1@brokaw.wa.com>
Tzadik Vanderhoof <tzadikv@my-deja.com> wrote in message
news:8h45dt$tu7$1@nnrp1.deja.com...
> ARRRRGGGGGGHHHHHH!!!!!!
>
> SOMEONE has GOT to do SOMETHING about "Tr" vs. "tr" !!!!!!!
You could always email lstein@cshl.org with suggestions. :-)
>
> I just spent half an hour puzzling over the extremely misleading error
> messages that Perl gives you, directing you to the WRONG LINE, when you
> use "tr" and you mean "Tr".
Did perldiag help at all?
> Now my wife is going to give me the silent
> treatment because I'm going to get home late!!!!
Good luck!
Lauren
------------------------------
Date: Wed, 31 May 2000 19:59:57 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Tr vs. tr !@#@!#$@#%
Message-Id: <brian-ya02408000R3105001959570001@news.panix.com>
In article <8h45dt$tu7$1@nnrp1.deja.com>, Tzadik Vanderhoof <tzadikv@my-deja.com> posted:
> ARRRRGGGGGGHHHHHH!!!!!!
>
> SOMEONE has GOT to do SOMETHING about "Tr" vs. "tr" !!!!!!!
do you mean CGI.pm? it's already been done - just read the docs.
if you don't read the docs, then who is to blame?
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>
------------------------------
Date: 1 Jun 2000 00:10:08 GMT
From: bmetcalf@baynetworks.com (Brandon Metcalf)
Subject: Re: Tr vs. tr !@#@!#$@#%
Message-Id: <8h49l0$mkv$2@spinner.corpeast.baynetworks.com>
tzadikv@my-deja.com writes:
> ARRRRGGGGGGHHHHHH!!!!!!
>
> SOMEONE has GOT to do SOMETHING about "Tr" vs. "tr" !!!!!!!
>
> I just spent half an hour puzzling over the extremely misleading error
> messages that Perl gives you, directing you to the WRONG LINE, when you
> use "tr" and you mean "Tr". AND THE EXACT SAME THING HAPPENNED TO ME
Did you 'use strict;' ? The error is straight forward if you did.
Bareword "Tr" not allowed while "strict subs" in use at ./kk line 7.
Also, since when did any builtin functions begin with a uppercase
letter? At least I can't think of any.
Brandon
------------------------------
Date: Wed, 31 May 2000 16:42:30 -0600
From: Tad Pepperling <tad@cyberconceptscorp.com>
Subject: What is this?
Message-Id: <39359556.19DDC8AD@cyberconceptscorp.com>
I have a section of code that I do not understand and can not find an
example of in any book.
-- Snipet --
if ($name !~ /_!Rest!/){
$value =~ s/,//;
$NewQuantity = $value;
}
-- Snipet --
This is used right after a read and parse routine. But what is the
"_!Rest!"
It is not seen anywhere else in the script and it does function.
Tad Pepperling.
www.geekmasters.com
------------------------------
Date: Wed, 31 May 2000 16:08:51 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: What is this?
Message-Id: <8h4643$n38$1@brokaw.wa.com>
Tad Pepperling <tad@cyberconceptscorp.com> wrote in message
news:39359556.19DDC8AD@cyberconceptscorp.com...
> I have a section of code that I do not understand and can not find an
> example of in any book.
>
> -- Snipet --
> if ($name !~ /_!Rest!/){
> $value =~ s/,//;
> $NewQuantity = $value;
> }
>
> -- Snipet --
>
> This is used right after a read and parse routine. But what is the
> "_!Rest!"
In English: If the value of $name does not contain the string '_!Rest!', do
something.
Look at your data.
Lauren
------------------------------
Date: 31 May 2000 22:14:17 GMT
From: abigail@arena-i.com (Abigail)
Subject: Re: Why this matching/replace is not working?
Message-Id: <8h42rp$3hi$1@news.panix.com>
On 31 May 2000 11:29:19 GMT, David Collantes <david@atlantis.bus.ucf.edu> wrote:
++
++ I have the following:
++
++ $sub_post =~ s/\s+/ \+/;
++
++ What I am trying to accomplish is to replace any number of SPACES for the sam
++ there? Help anyone?!
Well, you are doing a lot of things wrong.
First, you are using lines more than 80 characters long in your posting.
Keep them to 72 or less, so they can be quoted as well.
Second, you aren't replacing spaces, you are replacing a sequence of
whitespace.
Third, there's a pointless escape of a + in the replacement part.
Fourth, the + in the replacement part doesn't have any magical properties.
$sub_post =~ s/ / /g;
Abigail
------------------------------
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 3225
**************************************