[12445] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6046 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 18 13:07:24 1999

Date: Fri, 18 Jun 99 10:01:34 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 18 Jun 1999     Volume: 8 Number: 6046

Today's topics:
    Re: newbie (Abigail)
    Re: odd autoincrement behavior ? (Abigail)
        Passing Hash - Am I Doing This Right? (Effie Rover)
    Re: pattern match by column (brian d foy)
    Re: pattern match by column (Randal L. Schwartz)
    Re: Perl scripts slows down servers? (Abigail)
        Perl und MS Exchange <dpotocnik@access.ch>
    Re: Problems with File-module <rootbeer@redcat.com>
    Re: Question (Randal L. Schwartz)
    Re: Recommend a simple Online database? <cassell@mail.cor.epa.gov>
    Re: Removing parts of a filepath <pavel@asei.cz>
    Re: Removing parts of a filepath <rootbeer@redcat.com>
    Re: script to lookup phone number off website? <rootbeer@redcat.com>
    Re: sorting an array from 2nd element onwards (Larry Rosler)
    Re: sorting an array from 2nd element onwards (Abigail)
    Re: sorting an array from 2nd element onwards (Abigail)
    Re: split a string character by character (Larry Rosler)
    Re: sprintf and money <rootbeer@redcat.com>
        Tk/Text colorizing routine <gbartels@xli.com>
    Re: two backspaces <jphillip@onyx.southwind.net>
    Re: Using cgi or servlets, now? <rootbeer@redcat.com>
    Re: Using Perl on MS PWS <cassell@mail.cor.epa.gov>
    Re: Variable substitution problem <xpalo03@vse.cz>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 18 Jun 1999 09:42:36 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: newbie
Message-Id: <slrn7mkmmp.ga3.abigail@alexandra.delanet.com>

jvavatara@my-deja.com (jvavatara@my-deja.com) wrote on MMCXVII September
MCMXCIII in <URL:news:7kcf3d$6fr$1@nnrp1.deja.com>:
{} I'm curious, I am just getting into web programming.  I'm a vb
{} programmer by trade so I was going to approach the things by learning
{} asp, javascript, and vbscript (html is a given).
{} 
{} Is javascript easy to implement on the client for both browsers?  Do I
{} need to know any C or Perl??

Perhaps you wanted to post this comp.lang.javascript?

{} Is java overtaking perl?


You ask that in _comp.lang.perl.misc_ ???? *boggle*



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 18 Jun 1999 09:44:36 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: odd autoincrement behavior ?
Message-Id: <slrn7mkmqi.ga3.abigail@alexandra.delanet.com>

Bill Jones (bill@fccj.org) wrote on MMCXVII September MCMXCIII in
<URL:news:376a2569.0@usenet.fccj.cc.fl.us>:
\\ Under MacPerl I get
\\ 
\\ # Missing $ on loop variable.
\\ File 'Untitled #4'; Line 39
\\ 
\\ It doesn't like -
\\ 
\\  print "$_ : $hash{$_}\n" foreach sort keys %hash;


That's because you have a syntax error. Where's the list you iterate over?



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Fri, 18 Jun 1999 16:54:15 GMT
From: null@effierover.com (Effie Rover)
Subject: Passing Hash - Am I Doing This Right?
Message-Id: <376d77d5.1897928162@news.iinc.com>


Silly question, related to another in the newsgroup but not quite the
same. I've been modifying some package code that came with a system
we're using and ran into scoping trouble.

The existing code used %query to hold values passed in from a secure
form, and I couldn't get at the values from inside a subroutine in the
package. Here's what I did (roughly):

  &result = SaveOrderInfo($orderid, $timestamp, %query);

and on the inside:

sub SaveOrderInfo {

  my $oid = $_[0];
  my $ts = $_[1];
  my %form = @_[2];

I got from point A to here by trying everything until something
finally worked :) - I get the values. Question I have is, this doesn't
seem quite right. Was there a better way to do it without changing the
original variable scope (and thereby possibly altering the program's
behaviour)?

Thanks in advance (while I'm at it, thanks for the previous answers
I've gotten here. My custom search tool is now functioning :)

  -- Loy

Loy Ellen Gross AKA Effie Rover
The email address above goes straight to /dev/null :-)
effie -at- effierover -dot- com * http://www.effierover.com
Effie Rover's Fantasy Role Playing Gamer's Library



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

Date: Fri, 18 Jun 1999 12:10:37 -0400
From: brian@pm.org (brian d foy)
Subject: Re: pattern match by column
Message-Id: <brian-ya02408000R1806991210370001@news.panix.com>

In article <929719290.28238.0.nnrp-04.9e980b2b@news.demon.co.uk>, "Michael Culverhouse" <mculverhouse@pinnacle.co.uk> posted:

> I wish to change a certain string say '0101' to '9999' but only in columns
> 80 through 83.
> Does anyone know how this is acheived please?
>

use substr() as an lvalue.  see the perlfunc man page for details :)

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: 18 Jun 1999 09:02:25 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: pattern match by column
Message-Id: <m11zf91oq6.fsf@halfdome.holdit.com>

>>>>> "Michael" == Michael Culverhouse <mculverhouse@pinnacle.co.uk> writes:

Michael> I wish to change a certain string say '0101' to '9999' but only in columns
Michael> 80 through 83.
Michael> Does anyone know how this is acheived please?

substr($x, 79, 4) =~ s/0101/9999/;

print "Just another Perl hacker,"

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: 18 Jun 1999 09:46:08 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl scripts slows down servers?
Message-Id: <slrn7mkmte.ga3.abigail@alexandra.delanet.com>

moi (toxid@rdtest.mm.atos-group.com) wrote on MMCXVII September MCMXCIII
in <URL:news:824F4EA25713D311B1740000D11A1E05459A78@grp-nt1.segin.com>:
|| that's the question...


Or course they do! *Anything* you run on a computer slows it down.



Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Fri, 18 Jun 1999 18:27:06 +0200
From: "dpotocnik" <dpotocnik@access.ch>
Subject: Perl und MS Exchange
Message-Id: <7kds3j$i9r$2@pacifica.access.ch>

Sehr geehrte Perl Enthusiasten

In meiner Firma mvchte ich sehr gerne meinen Chef
von Perl |berzeugen. Da er der Meinung ist, dass Perl in einem Unternehmen
gar keine Verbreitung findet, m|sste ich Ihn vom Gegenteil beindrucken.
In Zukunft kriegen wir ndmlich einen MS Exchange Server ins Hause, und ich
denke mir, dass sich mit Perl diesbez|glich sicher was machen ldsst (da ja
Perl die Nr.1 f|rs Internet ist).
Meine Frage:
Kann MS Exchange Server als POP3 Server fungieren ? Hat jemand unter euch
schon Erfahrungen in diesem Sinne gesammelt ?

Was ich noch erwdhnen muss ist, dass ich noch fast kein Know - How in Sachen
Perl besitze.

Vielen Dank f|r euer Engagement !

Gruss Dejan







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

Date: Fri, 18 Jun 1999 09:33:35 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Problems with File-module
Message-Id: <Pine.GSO.4.02A.9906180928280.5420-100000@user2.teleport.com>

On Fri, 18 Jun 1999, Thomas Weholt wrote:

> It seems like it onyl apply to some cds. Have no clue why.

I think you're talking about setting $File::Find::dont_use_nlink. If
setting that fixed the problem, that means that the CDs in question almost
certainly have a non-standard directory structure (at least, from a Unix
standpoint it's not standard). For example, some directory may not contain
the special files dot and dot-dot. See the comments in the code of the
File::Find module for more information.

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 18 Jun 1999 09:05:04 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Question
Message-Id: <m1wvx1ze8f.fsf@halfdome.holdit.com>

>>>>> "carmela" == carmela  <info@datalist.com> writes:


carmela> Where do I post employment information for the Perl community in Toronto?

In a newsgroup with "jobs" in the name.  Perhaps there's some toronto
regional groups like that.  Or just use misc.jobs.offered.  If someone
is looking for a job, they'll be searching with Dejanews anyway. :)

Thanks for asking.  I see too many job postings in here to wonder if
*anyone* ever reads the Usenet manual (aka news.announce.newusers)
anymore.

Just another Usenet old-timer (since 1980 when it was still on under
100 systems),

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Fri, 18 Jun 1999 09:08:49 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Recommend a simple Online database?
Message-Id: <376A6F11.B8713A03@mail.cor.epa.gov>

Tom Christiansen wrote:
> [a bunch of good stuff I heartlessly snip]
> I do know that I would trust someone who didn't fully understand the Unix
    ^^             ^^^^^
Is that supposed to be "I do know that I wouldn't trust.." or is it
supposed to be "I don't know that I would trust.." ?

> mindset to correctly present the power of Perl.  Think of not just $0,
> @ARGV, and %ENV, or the standard function set, but the tool-and-filter
> approach magic <ARGV>, backticks, and the rest of the Unix model.

fork and exec!  I was totally clueless about fork() when I started
learning Perl.  [Yes, I confess it...]

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Fri, 18 Jun 1999 18:06:49 +0200
From: Pavel Hlavnicka <pavel@asei.cz>
To: Thomas Weholt <thomas@bibsyst.no>
Subject: Re: Removing parts of a filepath
Message-Id: <376A6E99.ED8BF4CE@asei.cz>

One possible way:

$foo = "/home/thomas/files/stuff/prosject/perl/test_app-v1.02.tar.gz";
$foo =~ s:(.*)(\/perl\/.*):$2:;
print $foo;

prints string beginning at last occurence of /perl/

-- 
Pavel Hlavnicka
A.S.E.I. Ltd; Prague
tel.: +420 2 24106102
e-mail: pavel@asei.cz


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

Date: Fri, 18 Jun 1999 09:51:24 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Removing parts of a filepath
Message-Id: <Pine.GSO.4.02A.9906180949370.5420-100000@user2.teleport.com>

On Fri, 18 Jun 1999, Thomas Weholt wrote:

> How do I remove parts of a filepath? 

Generally, with File::Basename.

> Tried to use stuff like
> 
> $destination =~ s/$string_to_remove//;
> $destination =~ s/$string_to_remove//g;

If your question is, "Why doesn't this substitution do what I ask of it?",
that's another matter. Maybe you forgot to use an anchor and quotemeta.

Good luck with it!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 18 Jun 1999 09:26:22 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: script to lookup phone number off website?
Message-Id: <Pine.GSO.4.02A.9906180926010.5420-100000@user2.teleport.com>

On Fri, 18 Jun 1999, AL wrote:

> I'm looking for a script that can pull the phone number off a
> website like switchboard.com.  Anyone know of such a beast?

If you're wishing merely to _find_ (as opposed to write) programs,
this newsgroup may not be the best resource for you. There are many
freeware and shareware archives which you can find by searching Yahoo
or a similar service. Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 18 Jun 1999 09:09:44 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: sorting an array from 2nd element onwards
Message-Id: <MPG.11d40f204e7e1ea0989bfc@nntp.hpl.hp.com>

In article <ff8ck7.clk.ln@magna.metronet.com> on Thu, 17 Jun 1999 
21:47:27 -0400, Tad McClellan <tadmc@metronet.com> says...
> JQ (pigs_can_fly@mindless.com) wrote:
> : Is it possible to sort an array alphabetically only from the 2nd
> : element onwards?
 ...
> : I know I could extract the first element (MONKEY) from the array, sort
> : the array, then put MONKEY back in using "unshift", but is there a
> : shorter and more efficient way to do this?
> 
>    What part of the FAQ about sorting are you having trouble with?

What part of reading the question and interpreting it correctly are you 
having trouble with?

[Sometimes they fool us by asking a Not So Frequently Asked Question :-]

my @sorted = ($array[0], sort @array[1 .. $#array]);

my @sorted = (shift @array, sort @array);

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 18 Jun 1999 09:47:16 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: sorting an array from 2nd element onwards
Message-Id: <slrn7mkmvi.ga3.abigail@alexandra.delanet.com>

JQ (pigs_can_fly@mindless.com) wrote on MMCXVII September MCMXCIII in
<URL:news:3774e157.23315031@news.cyberway.com.sg>:
[] Hi
[] 
[] Is it possible to sort an array alphabetically only from the 2nd
[] element onwards?


@array [1 .. $#array] = sort @array [1 .. $#array];



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 18 Jun 1999 09:49:33 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: sorting an array from 2nd element onwards
Message-Id: <slrn7mkn3r.ga3.abigail@alexandra.delanet.com>

Marko Hoepken (marko.hoepken@sican.de) wrote on MMCXVII September
MCMXCIII in <URL:news:376A2C80.EC2BAAD2@sican.de>:
~~ 
~~ Try (not tested):
~~ 
~~ @array=shift(sort(unshift(@array))); # looks ugly but cooool (uses $_ to handle first element)
~~ 


But neither shift, nor unshift use $_. I've no idea how you want this work.



Abigail
-- 
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Fri, 18 Jun 1999 09:20:48 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: split a string character by character
Message-Id: <MPG.11d411bdafa95710989bfd@nntp.hpl.hp.com>

In article <7kcse7$s2c$1@gatekeeper.ornano.kapt.com> on Fri, 18 Jun 1999 
09:27:54 +0200, Fred Ruffet <fruffet@kaptech.com> says...
> my answer doesn't give the chars but their ascii codes... I don't have my
> camel book to retrieve all the unpack codes.

Why do you need the Camel to use the Perl docs?  `perldoc -f pack`

> $data="foo bar.com";
> @list=unpack("c*",$data);
> foreach $car (@list) {
>     print chr($car),"\n";
> }

#!/usr/local/bin/perl -w
use strict;

my $data = 'foo bar.com';
my @list = unpack 'A' x length $data, $data;
print "$_\n" for @list;
__END__

But 'split //' seems more natural to me, and at a guess more efficient.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Fri, 18 Jun 1999 09:07:40 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: sprintf and money
Message-Id: <Pine.GSO.4.02A.9906180903450.5420-100000@user2.teleport.com>

On Fri, 18 Jun 1999, James Stewart wrote:

> Subject: sprintf and money

> Can anyone point me to a place where I can find out how to zero pad
> numerical values so they always have two zeros after the decimal
> point?

In what way was the entry for 'sprintf' in the docs insufficient for your
needs? 

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 18 Jun 1999 11:41:28 -0400
From: Greg Bartels <gbartels@xli.com>
Subject: Tk/Text colorizing routine
Message-Id: <376A68A8.90FFBD71@xli.com>

Tk::Text and Tk::TextUndo should be released soon with
a lot of new functionality to make the modules more
sophisticated and support many standard text editing
functions.

one thing missing is the ability to color highlight
the displayed text based on a given arbitrary set of
rules.  Be able to define rules for Perl, or C, or
whatever, such that the widget will color highlight
the text it is displaying, making it easier to read.
and easier to write code.

does anyone know of a module that already exists to 
do this? can anyone point me in the right direction?

Greg


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

Date: Fri, 18 Jun 1999 16:08:10 GMT
From: John Phillips <jphillip@onyx.southwind.net>
Subject: Re: two backspaces
Message-Id: <K9ua3.3350$A24.118788@typ42b.nn.bcandid.com>

georgee1631@my-deja.com wrote:
> open(OUT, ">output");
> print (OUT "delete the characters after this aa\b");

> The above deletes the last "a", but

> open(OUT, ">output");
> print (OUT "delete the characters after this aa\b\b");

> deletes one a and puts a ^H in its place. Can anyone help me on this.

> Thanks

> George.


> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---

-- 

You didn't delete any characters, you backspaced (\b) and print over them.



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

Date: Fri, 18 Jun 1999 09:09:20 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Using cgi or servlets, now?
Message-Id: <Pine.GSO.4.02A.9906180908250.5420-100000@user2.teleport.com>

On Fri, 18 Jun 1999, moi wrote:

> Subject: Using cgi or servlets, now?

You seem to have a question about using CGI programs or servlets. Perhaps
the docs, FAQs, and newsgroups about these topics would be of assistance
to you. Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 18 Jun 1999 09:29:06 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Using Perl on MS PWS
Message-Id: <376A73D2.7794B8A3@mail.cor.epa.gov>

Mike Cooper wrote:
> 
> Hi John,
> Can't really be of much help, but it's something I need to do on NT soon.
> Maybe Microsoft article Q150629 "Configuring and Testing a PERL Script with
> IIS" would help. I've pasted the text below.

I snipped most of it, but it's nice M$ is trying to help here.
But...

> print "HTTP/1.0 200 OK\n"; print "Content-Type: text/html\n\n"; 
> print "<HTML>\n"; print "<HEAD>\n"; print "<TITLE>Hello World</TITLE>\n";
> print "</HEAD>\n"; print "<BODY>\n"; print "<H4>Hello World</H4>\n"; print
> "<P>\n"; print "Your IP Address is $ENV{REMOTE_ADDR}.\n"; print "<P>"; print
> "<H5>Have a nice day</H5>\n"; print "</BODY>\n"; print "</HTML>\n";

This is some of the worst-looking code I've seen.  Whoever wrote it
has either lost the ability to cut-and-paste or never learned a
programming style.  And then there are all the technical issues,
starting with the missing shebang line so no -w flag exists, and working
down through the ugly multiple prints.  Yuck.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Fri, 18 Jun 1999 18:13:05 +0200
From: Ondrej Palkovsky <xpalo03@vse.cz>
Subject: Re: Variable substitution problem
Message-Id: <376A7011.7062DA0F@vse.cz>

vectorcalculus@my-deja.com wrote:

> open (IN, "htmlfile.html");
> while <IN> {
>   print;
> }
> close (IN);
> 
> it doesn't replace the variables named in
> "htmlfile.html".  Is there a way to substitute
> values in for variables named in the html file?
> (And by variables, I mean scalars)

I've just read the perlfaq4:
How can I expand variables in text strings?

       Let's assume that you have a string like:

           $text = 'this has a $foo in it and a $bar';
           $text =~ s/\$(\w+)/${$1}/g;

-- 
It is better to be bow-legged than no-legged.


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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