[16252] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3664 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 14 06:10:28 2000

Date: Fri, 14 Jul 2000 03: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: <963569418-v9-i3664@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 14 Jul 2000     Volume: 9 Number: 3664

Today's topics:
        Silly Question? <r.cole@gu.edu.au>
    Re: Silly Question? (HiTekHick)
    Re: Silly Question? (jason)
    Re: Silly Question? <o1technospam@skyenet.nospam.net>
    Re: Silly Question? <bcaligari@shipreg.com>
    Re: String length? (jason)
    Re: String length? <o1technospam@skyenet.nospam.net>
    Re: String length? <o1technospam@skyenet.nospam.net>
        stupid answer [was: Silly Question?] (jason)
        The newbie question (HiTekHick)
    Re: The newbie question (Andrew Johnson)
    Re: The newbie question (jason)
    Re: Upper-to-lower case problem (Alan Page)
    Re: Upper-to-lower case problem (Alan Page)
    Re: Upper-to-lower case problem (jason)
    Re: Upper-to-lower case problem <nnickee@nnickee.com>
    Re: Upper-to-lower case problem (jason)
        Use strict & subroutines <andrei@unforgettable.com>
    Re: Use strict & subroutines (Bernard El-Hagin)
    Re: Using variables in regexps <marc.schaefer@warwick.ac.uk>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 14 Jul 2000 17:01:50 +1000
From: Richard Cole <r.cole@gu.edu.au>
Subject: Silly Question?
Message-Id: <396EBADE.E0B17DD@gu.edu.au>


I'm a beginner to perl and I tried the following programs:

#!/usr/bin/perl
$A = "A\nB";
if ( $A == "" ) { print "empty"; };

and

#!/usr/bin/perl
$A = "A\nB";
if ( $A != "" ) { print "not empty"; };

and

#!/usr/bin/perl
$A = "A\nB";
if (! $A == "") { print "not empty"; };

The first two didn't produce any output but the third one did. This
seems a tad inconsistent to me.
Am I missing something?

Richard Cole.





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

Date: 14 Jul 2000 02:30:53 -0500
From: HiTekHick@hillbilly.com (HiTekHick)
Subject: Re: Silly Question?
Message-Id: <8F712FFF0newsid7759367@216.65.3.131>

r.cole@mailbox.gu.edu.au (Richard Cole) wrote in 
<396EBADE.E0B17DD@gu.edu.au>:

>
>#!/usr/bin/perl
>$A = "A\nB";
>if ( $A == "" ) { print "empty"; };
>
>
>#!/usr/bin/perl
>$A = "A\nB";
>if ( $A != "" ) { print "not empty"; };
>
>
>#!/usr/bin/perl
>$A = "A\nB";
>if (! $A == "") { print "not empty"; };
>

I would use these 2 ... 

(notice changes)

$A = "A\nB";
if ( $A = "" ) { print "empty"; }


$A = "A\nB";
if ( $A != "" ) { print "not empty"; }





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

Date: Fri, 14 Jul 2000 08:07:18 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Silly Question?
Message-Id: <MPG.13d9677f4af864f19896ab@news>

Richard Cole wrote ..
>I'm a beginner to perl and I tried the following programs:

a) ignore the posting from HiTekHick@hillbilly.com (HiTekHick) .. it's 
entirely wrong

>#!/usr/bin/perl

b) change your shebang line to include warnings

  #!/usr/bin/perl -w

then Perl will tell you the answer to your question

also .. once you've got past this 'hurdle' add the following line as the 
first line after the shebang line in all your Perl programs

  use strict;

although it means more work in the short term .. it will save you from a 
lot of hassle in the long term by ensuring that you are coding

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Fri, 14 Jul 2000 03:33:46 -0500
From: "Jim Kauzlarich" <o1technospam@skyenet.nospam.net>
Subject: Re: Silly Question?
Message-Id: <G8Ab5.903$RX5.1439@newsfeed.slurp.net>


"HiTekHick" <HiTekHick@hillbilly.com> wrote in message
news:8F712FFF0newsid7759367@216.65.3.131...
> r.cole@mailbox.gu.edu.au (Richard Cole) wrote in
> <396EBADE.E0B17DD@gu.edu.au>:
>
> >
> >#!/usr/bin/perl
> >$A = "A\nB";
> >if ( $A == "" ) { print "empty"; };
> >
> >
> >#!/usr/bin/perl
> >$A = "A\nB";
> >if ( $A != "" ) { print "not empty"; };
> >
> >
> >#!/usr/bin/perl
> >$A = "A\nB";
> >if (! $A == "") { print "not empty"; };
> >
>
> I would use these 2 ...
>
> (notice changes)
>
> $A = "A\nB";
> if ( $A = "" ) { print "empty"; }
>
>
> $A = "A\nB";
> if ( $A != "" ) { print "not empty"; }
>

Whaaa???  Even I know this one.  I'd say that this was a RTFM question, but
the answer is just flat out wrong.  The = is not an evaluation.  IE
if ( $A = "" )
will never be false, and $A (after that if) will always be ""
 = is an assignment operater.  The only way that if ( $A = "" ) could be
false is if for some reason $A could not be set to "".  And I'm guessing
that a run-time or compilation err would be more likely.

simple evaluation in Perl:

numbers     strings

  ==         eq      equal
  !=         ne      not equal
  <          lt      less than
  >          gt      greater than
  <=         le      less than or equal to
  >=         ge      greater than or equal to

pg. 37  "Learning Pearl"
pg. 59  "Perl in a nutshell"
pg. 102 and 103 "Perl and CGI for the world wide web"

Just go to the index of most any book on Perl and look for ==







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

Date: Fri, 14 Jul 2000 10:51:12 +0200
From: "Brendon Caligari" <bcaligari@shipreg.com>
Subject: Re: Silly Question?
Message-Id: <8kmjmk$ria$1@news.news-service.com>


"Richard Cole" <r.cole@gu.edu.au> wrote in message
news:396EBADE.E0B17DD@gu.edu.au...
>
> I'm a beginner to perl and I tried the following programs:
>
> #!/usr/bin/perl
> $A = "A\nB";
> if ( $A == "" ) { print "empty"; };
>
> and
>
> #!/usr/bin/perl
> $A = "A\nB";
> if ( $A != "" ) { print "not empty"; };
>
> and
>
> #!/usr/bin/perl
> $A = "A\nB";
> if (! $A == "") { print "not empty"; };
>
> The first two didn't produce any output but the third one did. This
> seems a tad inconsistent to me.
> Am I missing something?
>
> Richard Cole.
>
>
>

perl has two sets of comparison operators
==, >, >=, <, <=, !=, <=> for numbers
eq, gt, ge, lt, le, ne, cmp for strings

also, try "use strict" and "#!/usr/bin/perl -w"

if you don't have it....buy the "programming perl" book
(and read it...of course :)

I'm still in chapter 2...and realised that i don't really like
perl that much.

B





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

Date: Fri, 14 Jul 2000 08:19:29 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: String length?
Message-Id: <MPG.13d96a621a8f08d29896ae@news>

Craig Berry wrote ..
>Jim Kauzlarich (o1technospam@skyenet.nospam.net) wrote:
>: I figured that I'd added in strict incorrectly, and changed it.  I also
>: don't understand why I didn't get an error when I put "use strict()" at the
>
>Strict can take an argument list, to determine what kinds of strictness
>you want.  This was just interpreted as an empty list, indicating that you
>want full strictness.

actually .. an empty list means that you want no strictness at all .. in 
actual fact it means that the import() function is not called in the 
used package .. as per the doco use Module (); is exactly equivalent to 
a require in a BEGIN block

  perldoc -f use

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Fri, 14 Jul 2000 04:05:45 -0500
From: "Jim Kauzlarich" <o1technospam@skyenet.nospam.net>
Subject: Re: String length?
Message-Id: <GCAb5.908$RX5.2830@newsfeed.slurp.net>


"Craig Berry" <cberry@cinenet.net> wrote in message
news:smtel1icnd6138@corp.supernews.com...
> Jim Kauzlarich (o1technospam@skyenet.nospam.net) wrote:
> : > :     if ( @_[$count] ne "" ) {
> : >
> : >   s/\@/\$/
> :
> : Regular expression I assume?  I haven't really delved into them yet.  Is
> : that a substitution?
>
> Yes it is.  It was my shorthand way of saying that your @_ should be $_;
> as written, it's an array slice.  And you should get up to speed on at
> least simple regexes soon; they're at the core of Perl.
>
> : I'm a bit surprised that no one snapped at my mis-attempt at using
strict.
> : "use strict();"  I'd been up for about 20 hours, and when I attempted to
add
> : strict. It came back with the following err that I'm still not sure what
> : means  (mee tawk gud englush, eh?)
> :
> : Global symbol "x" requires explicit package name at count3.cgi line 22.
> :
> : What is an "explicit package name"?
>
> This just means that you used a variable name without either explicitly
> declaring it as global (with 'use vars', or 'our' under 5.6) or making it
> lexical with a 'my' declaration.  The somewhat misleading error means that
> Perl wouldn't complain about the undeclared global if it were given an
> explicit package qualifier, like '$main::x'.  See the discussion on
> packages in the Camel book.

Which one?  "Programming Perl"?


> : I figured that I'd added in strict incorrectly, and changed it.  I also
> : don't understand why I didn't get an error when I put "use strict()" at
the
>
> Strict can take an argument list, to determine what kinds of strictness
> you want.  This was just interpreted as an empty list, indicating that you
> want full strictness.

Actually, I think it got interpreted as if I wanted no strictness at all.
The err went away when I changed it from strict; to strict();

Anywhoze, thanks.  I appreciate all the pointer I can get.
:)

JMK




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

Date: Fri, 14 Jul 2000 04:16:57 -0500
From: "Jim Kauzlarich" <o1technospam@skyenet.nospam.net>
Subject: Re: String length?
Message-Id: <dNAb5.911$RX5.2828@newsfeed.slurp.net>


"Jim Kauzlarich" <o1technospam@skyenet.nospam.net> wrote in message
news:Bzyb5.892$RX5.2612@newsfeed.slurp.net...
>
> "Tad McClellan" <tadmc@metronet.com> wrote in message
> news:slrn8mseeq.c0u.tadmc@magna.metronet.com...
> >    perldoc perlmod


> Ok.  Is a perldoc question off topic?  I'm gonna admit it.  Every time I
try
> to use perldoc I can't seem to scroll through it the way it seems I
should.
> And when I type in 'perldoc -h' I don't get a lot of help on the subject.

Ack!  Nevermind, I got it.  And for those of you other newbies who havent'
gotten it, just type h while running perldoc.  Boom!  Nice big help screen!

(Now who would have thought of making the 'h' key the help key?!?)   ;-)

JMK




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

Date: Fri, 14 Jul 2000 08:08:58 GMT
From: elephant@squirrelgroup.com (jason)
Subject: stupid answer [was: Silly Question?]
Message-Id: <MPG.13d967e95af2bc239896ac@news>

HiTekHick wrote ..
>I would use these 2 ... 
>
>(notice changes)
>
>$A = "A\nB";
>if ( $A = "" ) { print "empty"; }
>
>
>$A = "A\nB";
>if ( $A != "" ) { print "not empty"; }

please get a clue before posting an reponse to this newsgroup .. your 
code is almost certainly not doing what you think it is .. and it's 
certainly not doing what the originator wants .. read the documentation 
before trying again

  perldoc perlop

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: 14 Jul 2000 03:20:13 -0500
From: HiTekHick@hillbilly.com (HiTekHick)
Subject: The newbie question
Message-Id: <8F7126962newsid7759367@216.65.3.131>

I would consider myself a Perl "novice". No guru by far but I have 
received alot of good info just by searching (keyword: *search* to the 
other newbies) and reading past articles. I am interested in helping other 
newbies when possible.

My question is, (when relevant) should I attempt a lame reply that may 
have mistakes unbeknownst to myself, or just leave it up to the old pro`s 
to handle? 


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

Date: Fri, 14 Jul 2000 08:45:58 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: The newbie question
Message-Id: <arAb5.8014$k5.99580@news1.rdc1.mb.home.com>

In article <8F7126962newsid7759367@216.65.3.131>,
 HiTekHick <HiTekHick@hillbilly.com> wrote:
> I would consider myself a Perl "novice". No guru by far but I have 
> received alot of good info just by searching (keyword: *search* to the 
> other newbies) and reading past articles. I am interested in helping other 
> newbies when possible.
> 
> My question is, (when relevant) should I attempt a lame reply that may 
> have mistakes unbeknownst to myself, or just leave it up to the old pro`s 
> to handle? 

I would say -- if you think you have a good answer, and the question
isn't a FAQ (unless your answer is pointing to the appropriate FAQ),
and you've tested your code and pasted it rather than re-typed it,
then ... answer away and we'll all appreciate your contribution.

In other words:

    1) No, do not attempt a lame reply.
    
    2) Yes, do attempt a careful, tested, thought out reply.

    3) Of course, we all make mistakes -- do not let fear paralyze
       you and prevent you from becoming a contributor to the group
       (but, see 1 and 2 above :-)

regards,
andrew

-- 
Andrew L. Johnson   http://members.home.net/andrew-johnson/
      I drink to make other people interesting.
          -- George Jean Nathan


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

Date: Fri, 14 Jul 2000 09:16:22 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: The newbie question
Message-Id: <MPG.13d977b6fc3224e49896af@news>

Andrew Johnson wrote ..
>In article <8F7126962newsid7759367@216.65.3.131>,
> HiTekHick <HiTekHick@hillbilly.com> wrote:
>> I would consider myself a Perl "novice". No guru by far but I have 
>> received alot of good info just by searching (keyword: *search* to the 
>> other newbies) and reading past articles. I am interested in helping other 
>> newbies when possible.
>> 
>> My question is, (when relevant) should I attempt a lame reply that may 
>> have mistakes unbeknownst to myself, or just leave it up to the old pro`s 
>> to handle? 
>
>I would say -- if you think you have a good answer, and the question
>isn't a FAQ (unless your answer is pointing to the appropriate FAQ),
>and you've tested your code and pasted it rather than re-typed it,
>then ... answer away and we'll all appreciate your contribution.
>
>In other words:
>
>    1) No, do not attempt a lame reply.
>    
>    2) Yes, do attempt a careful, tested, thought out reply.
>
>    3) Of course, we all make mistakes -- do not let fear paralyze
>       you and prevent you from becoming a contributor to the group
>       (but, see 1 and 2 above :-)

  4) preface your answer with a small bit about your level of experience
     and don't state your answer as fact if you're not 100% certain that
     it is

eg.

"
I'm working through these comparison tests as well. The following seems 
to work, not sure if it's correct though because I'm still a beginner.

  $A = "A\nB";
  if ( $A = "" ) { print "empty"; }
"

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: 14 Jul 2000 07:06:46 GMT
From: alandpage@aol.comnospam (Alan Page)
Subject: Re: Upper-to-lower case problem
Message-Id: <20000714030646.18156.00000032@ng-mb1.aol.com>

>ok .. well the lc will probably not help you then (there was nothing 
>wrong with your tr/// code - assuming that you're using an english 
>locale - the default) .. show more code - like where else you're using 
>$batch

Jason,

Here's the whole script; there's not much to it. It runs fine without the
case-change piece; when  a visitor inputs a batch number (a-f) and a photo
number (759 - 999), the script redirects them to a web page of the same name.

For example, the user puts in "b" and "811"; the script returns
http://www.sizzlinsummer.com/sf/pages/b811.htm

I'm just trying to eliminate them putting in "B" instead of "b"

Thanks,
Alan

Code follows:

#!/usr/bin/perl54 


##Script to find the SF Music Festival participants' photos##

##Data submitted:
	#batch
	#photo

##Read posted data##
&ReadParse(*input);

#Get batch number (a,b,c,d,e,f)
$batch =  $input{'batch'};

#Convert to lowercase
$batch =~ tr/A-Z/a-z/; 

#Get photo number (759 - 999)
$photo =  $input{'photo'};

##See whether user left any fields blank##
if (($batch eq "") || ($photo eq ""))
{
	$message = qq|Sorry, your form was not complete. <BR> Please fill out all the
fields and try again.|;
	$valid = 0;
}
else {
	$valid = 1;
}

##Concatenate photo page's name (a759.htm, a760.htm, etc)
$page  = $batch . $photo . ".htm";

##Check to see if their photo exists
if (-e "../public_html/sf/pages/$page") {
      print qq|Location: http://www.sizzlinsummer.com/sf/pages/$page\n\n|;
}
else {
      print "Content-type: text/plain", "\n\n";
      print "Didn't find it: $page", "\n";
}



exit(0);




#######SUBS #####

sub ReadParse
{
#call: "&ReadParse(*input)", passes byref "%input" with multiple values
separated by "\0"


  local (*in) = @_ if @_;
  local ($i, $key, $val,$safety);

  # Read in text
  if ($ENV{'REQUEST_METHOD'} eq "GET")
  {
    $in = $ENV{'QUERY_STRING'};
  }
  elsif ($ENV{'REQUEST_METHOD'} eq "POST")
  {
    read(STDIN,$in,$ENV{'CONTENT_LENGTH'});
  }

  @in = split(/&/,$in);

  foreach $i (0 .. $#in)
  {
    # Convert plus's to spaces
    $in[$i] =~ s/\+/ /g;

    # Split into key and value.
    ($key, $val) = split(/=/,$in[$i],2); # splits on the first =.

    # Convert %XX from hex numbers to alphanumeric
    $key =~ s/%(..)/pack("c",hex($1))/ge;
    $val =~ s/%(..)/pack("c",hex($1))/ge;

    # Associate key and value
    $in{$key} .= "-" if (defined($in{$key})); # \0 is the multiple separator
    $in{$key} .= $val;
  }
  	return length($in);
}





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

Date: 14 Jul 2000 07:11:10 GMT
From: alandpage@aol.comnospam (Alan Page)
Subject: Re: Upper-to-lower case problem
Message-Id: <20000714031110.18156.00000035@ng-mb1.aol.com>

>sorry .. I forgot - no telnet .. you must be testing it somewhere ?
>

Testing would be a strong word for what I'm doing. I'm editing it on the PC,
FTPing it up, running it via a form in HTML, and observing output in the
browser and when needed, the server error logs.

If Perl is available for the Win95 platform, would it be easier for me to
install it locally for testing purposes?

Thanks,
Alan


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

Date: Fri, 14 Jul 2000 07:42:16 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Upper-to-lower case problem
Message-Id: <MPG.13d961a8acd7c2599896a9@news>

Alan Page wrote ..
>>sorry .. I forgot - no telnet .. you must be testing it somewhere ?
>>
>
>Testing would be a strong word for what I'm doing. I'm editing it on the PC,
>FTPing it up, running it via a form in HTML, and observing output in the
>browser and when needed, the server error logs.
>
>If Perl is available for the Win95 platform, would it be easier for me to
>install it locally for testing purposes?

oh yes .. it sure would .. check out the very good Win32 Perl 
distribution from ActiveState

  http://www.activestate.com/ActivePerl/

makes for some pretty platform independant programming (especially for 
the CGI - which generally requires very little operating system specific 
extensions or system calls)

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Fri, 14 Jul 2000 02:57:42 -0500
From: Nnickee <nnickee@nnickee.com>
Subject: Re: Upper-to-lower case problem
Message-Id: <B35E9E23999AADFA.7D7A836D5CCD0C8D.9DF4E8B4FDAEC893@lp.airnews.net>

On 14 Jul 2000 07:11:10 GMT, someone claiming to be
alandpage@aol.comnospam (Alan Page) said:

>Testing would be a strong word for what I'm doing. I'm editing it on the PC,
>FTPing it up, running it via a form in HTML, and observing output in the
>browser and when needed, the server error logs.

ouch.  I feel for ya.

>If Perl is available for the Win95 platform, would it be easier for me to
>install it locally for testing purposes?

It certainly is available for win95.  http://www.activestate.com/

As far as testing goes, you'll need to install a web server as well if
you want to test it in your browser (apache is a good free one, and
they do have a port for win95), but you don't *have* to do that -- you
can just run it from your command prompt, which might not solve
*everything* for you, but it will certainly save you a *lot* of
aggrivation (and time).

apache for win is available from http://www.apache.org/

install perl first - its documentation will be installed onto your
system (html format) and one of the sections is web server config
which will help you get apache configured if you decide to install it
as well.

HTH
Nnickee



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

Date: Fri, 14 Jul 2000 08:02:27 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Upper-to-lower case problem
Message-Id: <MPG.13d9666065fce8f39896aa@news>

Alan Page wrote ..
>>ok .. well the lc will probably not help you then (there was nothing 
>>wrong with your tr/// code - assuming that you're using an english 
>>locale - the default) .. show more code - like where else you're using 
>>$batch
>
>Here's the whole script; there's not much to it. It runs fine without the
>case-change piece; when  a visitor inputs a batch number (a-f) and a photo
>number (759 - 999), the script redirects them to a web page of the same name.
>
>For example, the user puts in "b" and "811"; the script returns
>http://www.sizzlinsummer.com/sf/pages/b811.htm
>
>I'm just trying to eliminate them putting in "B" instead of "b"

ok .. your code works fine for me .. so now I'm guessing that you're 
problem is elsewhere - and the fact that it occurs when you added that 
line is a coincidence

a few things that you can make sure of before you go looking for the 
answer

are you sure that you're uploading the code in ASCII mode in FTP ? .. 
are you sure that the filename isn't being munged somehow ? .. are you 
sure nothing else has changed - like the <form> tag in your HTML file ? 
 .. are you sure that the shebang line is the very first line of the 
program ?

check all those things .. I'm also guessing from your shebang line that 
you're using a 5.004 build of Perl .. you should try to have this 
upgraded to at least 5.005_03 .. if not the latest 5.6

other than that - talk to your sysadmin .. because your Perl code - at 
least on 5.005_03 - works

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Fri, 14 Jul 2000 09:07:03 GMT
From: Andrei <andrei@unforgettable.com>
Subject: Use strict & subroutines
Message-Id: <8kml7f$fk$1@nnrp1.deja.com>

Hi,

If I use "use strict" in a subroutine does it refer only to that
subroutine or to the whole script ?

--
Andrei Gologan


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 14 Jul 2000 10:02:02 GMT
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Use strict & subroutines
Message-Id: <slrn8mtp08.9rf.bernard.el-hagin@gdndev25.lido-tech>

On Fri, 14 Jul 2000 09:07:03 GMT, Andrei <andrei@unforgettable.com> wrote:
>Hi,
>
>If I use "use strict" in a subroutine does it refer only to that
>subroutine or to the whole script ?

Why don't you just test it? Write a sub with use strict inside of it and
then try to use an undeclared variable outside of the sub.

Bernard
--
perl -e'@x=(3,2,4,1,3,2,1,3,1,3,2,3,3,2,3,0,0,1,2,1,1,1,4,1,2,1,1,2,2,1,
2,1,2,1,2,1,2,1,1,1,2,1,0,0,3,2,3,2,3,2,1,1,1,1,1,2,4,2,3,2,1,2,1,0,0,1,
2,1,1,1,4,1,2,1,1,1,2,2,1,1,4,1,1,1,2,1,1,1,2,1,0,0,3,2,4,1,1,2,1,1,1,3,
1,1,1,4,1,1,1,2,1,1,3,0,0);sub x{print q x$xx$_;print q x x x shift@x};#
while(defined($_=shift @x)){s o0o\no;$_!=0?x:print}' #Symmetry yrtemmyS#


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

Date: 14 Jul 2000 10:07:08 +0200
From: Marc Schaefer <marc.schaefer@warwick.ac.uk>
Subject: Re: Using variables in regexps
Message-Id: <m3wvip5e4z.fsf@mapgw.csv.warwick.ac.uk>

Hi Tad,

tadmc@metronet.com (Tad McClellan) writes:

> You should read the description of tr/// before advising
> others to read the description of tr///!

Doh!

> So that _does_ remove the dollar sign, but it has a good deal
> of collateral damage associated with it  :-)

That is the really depressing part - I tried it before posting and it
worked ...

Sorry.

Best,

Marc


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

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 3664
**************************************


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