[8254] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1871 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 12 05:08:00 1998

Date: Thu, 12 Feb 98 02:00:28 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 12 Feb 1998     Volume: 8 Number: 1871

Today's topics:
    Re: <META HTTP-EQUIV="Refresh: QUESTION (Martien Verbruggen)
        A simple question <vidyanan@pilot.msu.edu>
    Re: A simple question <davidr@home.com>
    Re: Annoying Message Whenever I Read From a File <rjk@coos.dartmouth.edu>
    Re: Bad (Swear) Word Checking (Josh Fishman)
    Re: Code Example Needed (Martien Verbruggen)
        combine lines(swap 2)for novice user (P.M.Wong )
    Re: Credit Card Check (Martien Verbruggen)
    Re: FAQless Forays (was: Code Example Needed) <friedman@uci.edu>
    Re: FAQless Forays (was: Code Example Needed) <rjk@coos.dartmouth.edu>
    Re: FAQless Forays (was: Code Example Needed) (Mark Kramer)
    Re: Finding the last line in a list? (Craig Berry)
    Re: foreach and my() [GUTS; LONG] <dformosa@st.nepean.uws.edu.au>
    Re: How generate counter? (Craig Berry)
    Re: how to properly interpret a '-?' command line optio (Johan Vromans)
        New Perl Debugger for Win32 !! <jim@hotmail.com_no_spam>
    Re: output_autoflush and fork problem in perl <pbanks@ix.netcom.com>
    Re: Padding out a string (Craig Berry)
    Re: Perl Banner Rotation <jaco@mad.scientist.com>
        Perl in db2's Net.Data macro (William R. Mussatto)
    Re: Perl Wizard Quiz <rjk@coos.dartmouth.edu>
    Re: SOURCE: tcgrep <rjk@coos.dartmouth.edu>
        which sub calls my sub in perl module ? andreasw@prosolvia.se
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 12 Feb 1998 05:31:46 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: <META HTTP-EQUIV="Refresh: QUESTION
Message-Id: <6bu1g2$64p$1@comdyn.comdyn.com.au>

In article <6btkrt$6ji$1@nnrp2.dejanews.com>,
	mbudash@sonic.net writes:

[25 quoted lines snipped]

> print "Location: http://www.domain.com\n\n";

You just quoted a complete message to answer an off topic post,
without removing the two comp.lang.perl groups from the Newsgroups
line, and what's more, you posted that same answer three times.

Bad. Bad. bad.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Very funny Scotty, now beam down my
Commercial Dynamics Pty. Ltd.       | clothes.
NSW, Australia                      | 


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

Date: Thu, 12 Feb 1998 03:19:52 -0500
From: Premgith  Vidyanandan <vidyanan@pilot.msu.edu>
Subject: A simple question
Message-Id: <Pine.GSO.3.96.980212031525.12484A-100000@arctic.cps.msu.edu>


I have a simple problem, I have an entire web page in a variable called
$webpage, I have to go through this variable and put each line from it
into an array. I thought of making a while loop and splitting the lines
and adding it to an array. The problem with this is that I don't have a
clue as to how to check for the end of the $variable. If it was the end of
file then you could just put while (<filename>).
	Can someone please tell me how to do this, or if anyone knows of a
better way please let me know that too.. 


Thanks...



Premgith Vidyanandan
Tel -: Res (517) 333-4201
       Off (517) 355-4500 ext(193)
E-mail - vidyanan@pilot.msu.edu





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

Date: Thu, 12 Feb 1998 08:39:07 +0000
From: David Richardson <davidr@home.com>
Subject: Re: A simple question
Message-Id: <34E2B52B.1F120960@home.com>

Premgith Vidyanandan wrote:

> I have a simple problem, I have an entire web page in a variable called
> $webpage, I have to go through this variable and put each line from it
> into an array. I thought of making a while loop and splitting the lines
> and adding it to an array. The problem with this is that I don't have a
> clue as to how to check for the end of the $variable. If it was the end of
> file then you could just put while (<filename>).
>         Can someone please tell me how to do this, or if anyone knows of a
> better way please let me know that too..
>
> Thanks...
>
> Premgith Vidyanandan
> Tel -: Res (517) 333-4201
>        Off (517) 355-4500 ext(193)
> E-mail - vidyanan@pilot.msu.edu

  I am a little confused. Why would you put a web page in a scalar variable?
You could open the file and store it in an array and then process it but I
don't think this is the best way.

EX:

open(WEB_PAGE,"my_web_page.html") || die "Cannot open WebPage\n";
@Web_Page_Array = <WEB_PAGE>;
close WEB_PAGE;
foreach (@Web_Page_Array) {
              print;
}

What are you trying to do to the html file?

David R.






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

Date: Thu, 12 Feb 1998 01:08:27 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: Annoying Message Whenever I Read From a File
Message-Id: <34E291E1.4A0F468C@coos.dartmouth.edu>

[posted but not mailed - munged addresses are annoying]

Kevin M Simonson wrote:
> 
>      When I write a "perl" script that reads input from a file, and then
> execute the script, I get this annoying message telling me my file handle
> might be zero, and suggesting that I use the "defined()" command to test
> for it.

Read the warning again - that's definitely not what it's telling you.

>      Value of <HANDLE> construct can be "0"; test with defined() at Hmm line 3.

It clearly says the value of the <HANDLE> construct, in other words the value
returned by reading from the filehandle HANDLE, can be "0".  It does *not* say
your filehandle might be zero.

>      h46^h/simonson/Qp} cat Mdfd
>      #!/usr/local/bin/perl54 -w
>      open (HMM, "Hmm.Hmm");
>      while ((defined (HMM)) && ($SubBlock = <HMM>))
>      {  print "Read \"$SubBlock\".\n";
>      }
>      close HMM;

Ew!  That does not do what you want.  The reason the warning goes away is presumably
because Perl only catches the problem when the while conditional consists of
($var = <HANDLE>) and nothing more.  The warning goes away for your code not because
you fixed the problem, but because you hid it.

As the warning message says, you need to test the value of the <HANDLE> construct
with defined().  Like so:

while (defined($SubBlock = <HMM>)) {
   ...
}

It might help to know why you were getting that message.
Consider a file that looks like this:
foo\n
bar\n
0
without a newline at the end.  When your program reads in the last line,
$SubBlock is "0".  If you don't use defined(), that will evaluate to false,
and the while loop will end without processing the last line of the file.

Hope that helps!

Chipmunk


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

Date: Thu, 12 Feb 1998 02:13:18 -0500
From: josh@vortex.nyu.edu (Josh Fishman)
Subject: Re: Bad (Swear) Word Checking
Message-Id: <slrn6e589b.mga.josh@vortex.nyu.edu>

On Sun, 25 Jan 1998 23:49:33 -0500, Chipmunk <rjk@coos.dartmouth.edu> wrote:
>
>Whether or not anyone knows of a list of naughty words in foreign languages
>has absolutely nothing to do with Perl.
>
>Consider:
>If you were writing this application in C, you would be using the same list
>of naughty words.
>If you were writing this application in Java, you would be using the same
>list of naughty words.
>If you were writing this application on punch cards, you would be using the
>same list of naughty words.
>
>Catching on yet?

A valid point: I'm not sure about Java, but I used a
*LOT* more swear words when I was using C than I now
do using Perl. The things those punch card operators
must have said ...

  - Josh

-- 
   O<      ( (      [ Josh Fishman                  ]
 _NH >=O    ) )     [                 GPL DNA NOW   ]
<_>-<_   + :::::-.  [ Linux:                        ]
 HCl<O>     :::`-'  [ hex, bugs, flock() and poll() ]


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

Date: 12 Feb 1998 05:40:06 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Code Example Needed
Message-Id: <6bu1vm$64p$2@comdyn.comdyn.com.au>

In article <34e24a26.255146708@news.mw.mediaone.net>,
	mystra@torilmud.com (Eileen Kortright) writes:

>>You read 217 messages and not one of those contained something like:
> 
> That's right and I see you read as well as I do :P
> 
> Meaning: yah, I could have missed it. Just like you seem to have
> missed the fact that I already stated I read all the messages and
> didn't see it.

Then you didn't _read_ all the messages, because there are a whole
bunch of them out there.

Never mind. I'm tired now.

Martien
- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | If at first you don't succeed, try
Commercial Dynamics Pty. Ltd.       | again. Then quit; there's no use being
NSW, Australia                      | a damn fool about it.


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

Date: 12 Feb 1998 08:46:25 GMT
From: s11976@net1.hkbu.edu.hk (P.M.Wong )
Subject: combine lines(swap 2)for novice user
Message-Id: <6buct1$344$1@power42t.hkbu.edu.hk>

Sorry for asking the trivial question as i'm a newbir in perl
I have a file with 3 lines, say:
this is line 1
this is line 2
this is line 3

My objective is to turn them into one single line with first and 
second swapped, i.e. the result should be like:

this is line 2 this is line 1 this is line 3

What simple perl script could do this ?

--
        __
   / \_/  )             __   Pui Ming WONG (E-mail: pm@hkbu.edu.hk) 
  /      ( -------------  }  System Support Programmer, 
 (  =l=ll===============__}  Computing & Telecomm. Services Centre
  \   _  (                   Hong Kong Baptist University 
   \_/ \__)                  224 Waterloo Road, Hong Kong  


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

Date: 12 Feb 1998 05:54:54 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Credit Card Check
Message-Id: <6bu2re$694$1@comdyn.comdyn.com.au>

In article <887251750.1907621900@dejanews.com>,
	posting@antigo.com writes:
> Hello,	I've developed a online shopping cart for a company and have a
> credit card checker, however, I want to be able to test it without
> entering my actual credit card number.	Is there a so called fake credit
> card number that would pass the credit checker? Thanks.

What does this have to do with perl????

Use your mother's number.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Little girls, like butterflies, need no
Commercial Dynamics Pty. Ltd.       | excuse - Lazarus Long
NSW, Australia                      | 


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

Date: 12 Feb 1998 05:47:03 GMT
From: "Eric D. Friedman" <friedman@uci.edu>
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <6bu2cn$nu8@news.service.uci.edu>

In article <6btafg$2c4$1@csnews.cs.colorado.edu>,
Tom Christiansen  <tchrist@mox.perl.com> wrote:
<
<I'm sorry, but this whole "I don't have time to look it up on my own
<system, just tell me the quick answer" a really terrible attitude,

The baffling thing about it is that it's totally counter-intuitive.
When I need an answer, posting to Usenet is my last resort because
it's always faster to look in a book or in Dejanews.  Always.

-- 
Eric D. Friedman
friedman@uci.edu


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

Date: Thu, 12 Feb 1998 01:15:21 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <34E2937F.53ED8396@coos.dartmouth.edu>

[posted and mailed]

Tom Christiansen wrote:
> 
> In comp.lang.perl.misc, rjk@coos.dartmouth.edu writes:
> :Now I'm sure you'll be happy to point out that good posts tend to originate
> :from non-PCs rather than PCs.  But I still don't agree your conclusion
> :because, as I said, I post from a Mac.  :-)
> 
> A Mac *is* a PC, since PC == (primitive) personal computer.
> Remember that: A Mac is a PC.  Anyone who told you otherwise
> is lying, probably Bill.

Yes, I know that, that was part of my whole point!

I post from a PC (specifically a Mac) and I do not post 'bad' posts.
('Bad' meaning FAQs, CGI questions, etc.)

Therefore, I disagree that all posts from PCs should be killfiled.

Chipmunk


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

Date: Thu, 12 Feb 1998 06:23:50 GMT
From: c28f62@world.std.com (Mark Kramer)
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <Eo95rq.A5L@world.std.com>
Keywords: diatribe

In article <6btlol$f6k$1@csnews.cs.colorado.edu>,
Tom Christiansen  <tchrist@mox.perl.com> wrote:
>works.  You don't have to be old to be competant and a contribution to
>the group effort.  I know plenty.

So do other people, Tom. Maybe we don't know Larry's wife's name, though.

>I have tried in the last week to inject the group with something of
>what used to be here. 

Well, what you thought you were trying isn't what you have been doing.

For the last week or so you have been jumping down people's throats for
using newsreaders you don't like, even if the articles you are
complaining about have been formatted properly and meet every standard
for Usenet articles.  You enlightened us with your killfile entries,
but for some reason you don't actually use your own killfile. 

You have been taking great pride in posting people's unmunged addresses
so they can be spammed because you can't understand that spam costs
some people real money even if they could filter it like you do.

You have been flaming people because of the OS they use. Yes, maybe that
is how things used to be here, many many years ago, but that doesn't mean
it belongs here now.

>It means posting treatises on your thoughts
>and ruminations on matters technical relating to Perl.

Like your definitions of the seven stages of perl where you have to
know Larry's wife's name to be a wizard? Like your comparison of DOS
terms to "real programmer's terms" which had no perl relevance at all
and was just another exhibition of OS flaming?

No, making it like it should be doesn't involve that.

>But it doesn't mean spoonfeeding FAQs to those who won't read the docs.

Here's the main principle of Usenet. This is something that has always
been true, and every Usenet poster should understand this before
posting. They need to understand this even before they understand about
MIME and 72 character lines. I'll put it on a line by itself:

	If you don't want to read an article, DON'T read it.

The corrolary to this basic fact is:

	If you don't want to reply to an artcile, DON'T reply.

If you don't want to read articles from Mozilla sources, don't read
them.  If you don't want to "spoon feed" FAQs to people, don't do it.
No matter how complicated real professional programming is, these two
concepts of Usenet really are that simple. If you are using Usenet, you
should already know these concepts.

>For them, there can be no mercy.  This is not the place to hear greybeards
>recite their writings.  Why do you think we wrote them, for Heaven's sake?
>So we wouldn't have to go through this.  

So now we have a greybeard pontificating on how people are using poor
newsreaders and aren't reading his writings. If it isn't the place to
hear one recite his writings, is it the place for him to whine about
people not reading them?

>Nobody owes them anything. 

But you do owe the rest of us something. This group, as was pointed out
by another, used to be for discussion. Don't you owe it to those who
would actually discuss things the respect to not try to drown them out
with whining about DOS or Windows or Mozilla?

>If they never do anything but beg the quick answer, to get someone
>to do their work for them, they aren't contributing to our society.

And every time you whine at them about their newsreader, or slap them
by asking redundant questions you already know the answer to, YOU aren't
contributing, either. The first time it was cute. The second time was
interesting. Now it is just boring.

>So they must be pruned.  Killfiles are great.  But first a decent
>round of flamelessons so they get the message.

And that message would be what? That Tom Christiansen is a flamer with a
chip on his shoulder concerning newsreading software? That isn't a very 
good way to convince someone to accept your opinions.

>Killing by newsreader is probably the most effective thing you can do,

So please do it. Have you just admitted that you are NOT doing what you
think is the most effective thing to do? Is this a professional programmer
admitting this? One of the people who discusses rigourous thought?

>Plus any real programmer can trivially write their own newsreader,
>or forge the posting attribution.

Umm, I thought the goal you had was to limti this group to "real
programmers".  If a "real programmer" can use Mozilla and slip by your
killfile, then doesn't he deserve to be here?

>Soon we'll have a moderated group of one sort of another from which
>gimme-a-solution-right-nowrequests and the FAQless will find no support.

I hate to point this out to you, Tom, but 1) the moderated
comp.lang.perl.* group RFD died a long time ago, even when it was claimed
that you wouldn't post to a group that wasn't moderted. 2) a Usenet II
moderated group will not stop people from helping the ones you want
"pruned". In fact, it will be easier for them to get help since the
email addresses you complain about must be valid. You will not stop the
helpful from mailing an answer,  just like you can't stop them from
posting one now.

>And this horrible free-for-all will be left to children wondering around
>by themselves in the dark because they refuse to turn on the light and
>read the manual.  

In the meantime, there are those of us here who read the FAQs and use
perldoc who would appreciate it if you would stop flaming people for
the OS they post from. I won't ask you to spend that time doing
something constructive like answering questions, because how you use it
is up to you. I'd just point out that it would be  a shame if you got
the reputation as a flamer who should be killfiled. It used to be
special to see a tchrist posting. Now it's probably just a flame.




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

Date: 12 Feb 1998 07:06:03 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Finding the last line in a list?
Message-Id: <6bu70r$n2a$5@marina.cinenet.net>

Billy Chambless (billy@cast.msstate.edu) wrote:
: # Now, to get the last line from the list, we could:
: 
: # $lastline = pop(@list); # remove last element from @list
: # or...
: $lastline = $list[$#list]; # get last element from @list without removing

Or equivalently, my prefered idiom, since negative indices count from the 
right:

  $lastline = $list[-1];  # get last elem from @list without removing.

: # But, I'd rather not assume that, so let's do this:
: if ($list[$#list] =~ /\w+/) { $firstfield = $&; }

or even

  ($firstfield) = $list[-1] =~ /(\w+)/;

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: 12 Feb 1998 06:50:58 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: foreach and my() [GUTS; LONG]
Message-Id: <887266219.132186@cabal>

In <34E25F62.17A9E971@us.oracle.com> Denis Goddard <dgoddard@us.oracle.com> writes:

>Chipmunk wrote:
[...]

>All the more reson to code in a disciplined, maintainable fashion.
>"Global variables. Hurt people. Bad scene."

I would have to aggry with you here that in general Global variables are
baad things.  However it is good pratice if the code has multipal modes of
behavor eg if you have a program that works in both cammel and llema modes
you can have,

ungulate='Cammel'

--
Please excuse my spelling as I suffer from agraphia see the url in my header. 
Never trust a country with more peaple then sheep. 
Support NoCeM http://www.cm.org/                   
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: 12 Feb 1998 06:17:27 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: How generate counter?
Message-Id: <6bu45n$n2a$3@marina.cinenet.net>

Tom Christiansen (tchrist@mox.perl.com) wrote:
: Actually, one of these days we'll get a moderate group [...]

I can't imagine clpm or any future offspring being anything close to 
'moderate'. :)

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: 12 Feb 1998 09:10:36 +0100
From: JVromans@Squirrel.nl (Johan Vromans)
Subject: Re: how to properly interpret a '-?' command line option
Message-Id: <wl3iuqls0oz.fsf@plume.nl.compuware.com>

Hugh Williams <hughw@sr.hp.com> writes:

> I am using the Getopt::Std module to grab a number of command line
> options; I'd like to be able to allow the user to type
> 
> 	progname -?

Getopt::Long 2.12 and later allows for a lone question mark as an
alternate for a named option:

  use Getopt::Long 2.12;
  GetOptions ('help|?');

This will set $opt_help when called with "-help" or "-?".

If you want to use one-letter options only (like Getopt::Std):

  use Getopt::Long 2.12;
  Getopt::Long::config ("bundling");
  GetOptions ('h|?', 'a', 'b', ...);

-- Johan

URL: http://www.perl.com/CPAN/authors/id/JV/GetoptLong-2.13.tar.gz


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

Date: Thu, 12 Feb 1998 14:50:24 +0000
From: jim <jim@hotmail.com_no_spam>
Subject: New Perl Debugger for Win32 !!
Message-Id: <34E30C30.1121@hotmail.com_no_spam>

Hi Guys ,
 
 By searching the net i have found this amazing link  
 
 http://www.logos.com/perl/

 "The Logos Perl Debugger is a 32-bit Windows 
 application and an OLE Automation server..."

 Anyway,can someone explain what's the difference between
 the ActiveState Win32 Debugger and the Logos Win32 Debugger ?

 Regards
 Jim


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

Date: Wed, 11 Feb 1998 18:30:51 -0800
From: Paul Banks <pbanks@ix.netcom.com>
Subject: Re: output_autoflush and fork problem in perl
Message-Id: <34E25EDA.591272E2@ix.netcom.com>

I have had several requests for the code.  I guess I should have included it
when I put out the original message.  I have removed quite o bit of the
code, but I hope I have left you enough to look at.

#!/usr/local/bin/perl -w
use English;
use FileHandle;
use Getopt::Std;
print "Start driver \n";
--------  A lot of code removed --------
###########################################################################
# Setup IPC environment
###########################################################################
print ">> Setup IPC environment\n";
 fork_iostat($interval);
 fork_vmstat($interval);
 print "well, that was fun.  Now wait forever\n";
 $sleep_interval = $interval/2;
 while(1) {

 }

###########################################################################
# Functions
###########################################################################
sub fork_iostat() { # start collection iostat data
 print ">> Enter fork_iostat\n";
 if (fork) {
  print ">> parent fork_iostat\n";
 }
 else {
  print ">> child fork_iostat <$PID>\n";
  open (IOSTAT, "iostat $interval |") or
   die "iostat open failed <$!>\n";

  open (IOSTAT_OUT, "> iostat_out") or
   die "iostat_out open failed <$!>\n";

  while ($io_line = <IOSTAT>) {
   select IOSTAT_OUT;
   $| = 1;
   print IOSTAT_OUT "$io_line";
   print "$io_line" unless (!test_sw);
  }
  exit;
 }
}

sub fork_vmstat() { # start collection vmstat data
 print ">> Enter fork_vmstat\n";
 if (fork) {
  print ">> parent fork_vmstat\n";
 }
 else {
  print ">> child fork_vmstat <$PID>\n";
  open (VMSTAT, "vmstat $interval |") or
   die "vmstat open failed <$!>\n";

  open (VMSTAT_OUT, "> vmstat_out") or
   die "vmstat_out open failed <$!>\n";


  while ($vm_line = <VMSTAT>) {
   select VMSTAT_OUT;
   $| = 1;
   print VMSTAT_OUT $vm_line;
   print "$vm_line" unless (!test_sw);
  }
  exit;
 }
}




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

Date: 12 Feb 1998 06:26:45 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Padding out a string
Message-Id: <6bu4n5$n2a$4@marina.cinenet.net>

Martin Vorlaender (martin@RADIOGAGA.HARZ.DE) wrote:
: Tan Aksoy (tan@morline.com) wrote:
: : How would I pad out a string with extra characters?
: : e.g. I have the number 10 but would like to represent it as a 6-digit
: : number/string i.e. 000010.
: 
: sprintf '%06d', 10
: 
: See the section about sprintf() in the perlfunc POD.

This is actually one of those rare cases where Perl's doc is inadequate. 
Not everyone has doc on C's sprintf() function available; since Perl's
sprintf() refers to that doc, those who don't can't find any explanation
of the format specifiers available. 

(Now I just pray to all the Gods of Usenet that I haven't missed a 
complete list of format specs tucked away in perlfaq47...)

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Thu, 12 Feb 1998 09:33:38 +0200
From: "Jaco Greeff" <jaco@mad.scientist.com>
Subject: Re: Perl Banner Rotation
Message-Id: <6bu94r$f7u$1@news01.iafrica.com>


Tom Christiansen wrote in message <6btakk$2c4$2@csnews.cs.colorado.edu>...
>:I was wondering is there is any really good banner rotation software
>:(similar to the kind LinkExchange uses) available for a small price (free
is

<snip>
>News hunt.  Can you imagine posting "Hey, I need a spreadsheet program
>in C++" to the comp.lang.c++ newsgroup?

Point taken :) Sorry for wasting BW.

Jaco Greeff




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

Date: Thu, 12 Feb 1998 06:35:20 GMT
From: mussatto@earthlink.net (William R. Mussatto)
Subject: Perl in db2's Net.Data macro
Message-Id: <6bu553$gmj@suriname.earthlink.net>

I need better pattern matching than is provided in basic net.data
macro language.  Since this is perl's strength, has anyong any
pointers in using perl inside of net.data.  According to the doc's its
possible, but I'd like some pointers to setup and examples.  I'd RTFM
if someone will tell me where they are hidden.

Thanks

Bill Mussatto

For the record is AIX on RS6K system.



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

Date: Thu, 12 Feb 1998 00:55:57 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl Wizard Quiz
Message-Id: <34E28EF2.ECC6D34B@coos.dartmouth.edu>

[posted and mailed]

Tom Christiansen wrote:
> 
> Question:   What's the difference between /^Foo/s and /^Foo/?
> Type:      Regular Expressions
> Difficulty: 5/7 (Medium)
> 
> Answer:            There is no difference because /s only affects whether dot
>            can match newline.
> Correct:    No.
> Why:       /s does more than that.
             ^^^^^^^^^^^^^^^^^^^^^^


> Answer:            The first would allow the match to cross newline boundaries.
> Correct:    No.
> Why:       /s only makes a dot able to cross a newline, and then   
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>            only if the string actually has a newline in it.

These two statements appear to contradict each other.  Could you clarify them?

thanks,
Chipmunk


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

Date: Thu, 12 Feb 1998 01:24:15 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: SOURCE: tcgrep
Message-Id: <34E29596.E1A3DC0C@coos.dartmouth.edu>

[posted and mailed]

Tom Christiansen wrote:
> 
> Here's the long-lost version 1.3 of my tcgrep program,
> an improved grep that while slower, is much more featureful
> than the standard one.  Not the least part of which is that
> it supports perl regular expressions.

Cool, thanks.  I copied it over to my system immediately.

One thing...

>                 local($*);
> [...]
>     $opt_p && ($/ = '', $* = 1);
>     $opt_P && ($/ = eval(qq("$opt_P")), $*=1); # for -P '%%\n'

I'm curious why you used $* instead of /m and /s.

Chipmunk


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

Date: Thu, 12 Feb 1998 03:11:27 -0600
From: andreasw@prosolvia.se
Subject: which sub calls my sub in perl module ?
Message-Id: <887273562.556728323@dejanews.com>

Hey,

I get a warning from a subroutine within a perl module, which is called by
my script:
Use of uninitialized value at /<PATH>/Mathsubs.pm line 57.

I'm trying to find out where from it is called - I call it quite
frequently.

With $0, I get the name of my script,  ./up.pl
$. gives 0

the function I call is:

    55  sub RAD {
    56    my $a = shift @_;
    57    ($a * 0.01745329252);
    58  }

Is there another $<anything>, which I did not find in the documentation,
or do you see another possibility (except for brute-force manual
debugging) ?

Thanx,
  Andreas

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 1871
**************************************

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