[7582] in Perl-Users-Digest
Perl-Users Digest, Issue: 1208 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 21 11:17:13 1997
Date: Tue, 21 Oct 97 08:04:22 -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 Tue, 21 Oct 1997 Volume: 8 Number: 1208
Today's topics:
[Reposted due to Enlow UCE cancel]: Re: How do I match (Mike Stok)
[Reposted due to Enlow UCE cancel]: Re: How do I match <joshb@kadence.kom>
[Reposted due to Enlow UCE cancel]: Re: How do I match (Mike Stok)
[Reposted due to Enlow UCE cancel]: Re: How do I match <joshb@kadence.kom>
[Reposted due to Enlow UCE cancel]: Re: Huge files, <>, (Andrew M. Langmead)
[Reposted due to Enlow UCE cancel]: Re: Huge files, <>, (Jason Gloudon)
[Reposted due to Enlow UCE cancel]: Re: Huge files, <>, (Jason Gloudon)
[Reposted due to Enlow UCE cancel]: Re: Huge files, <>, (Andrew M. Langmead)
[Reposted due to Enlow UCE cancel]: Re: Including varia (Honza Pazdziora)
[Reposted due to Enlow UCE cancel]: Re: Including varia (Honza Pazdziora)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 20 Oct 1997 18:30:06 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: [Reposted due to Enlow UCE cancel]: Re: How do I match the first word in a string?
Message-Id: <REPOST-10045.693420410156.62g7ve$pl2@news-central.tiac.net>
In article <bskendigEID2EL.Bq@netcom.com>,
Brian Kendig <bskendig@netcom.com> wrote:
>This should be simple, but it's got me stumped. I'm trying to assign
>the first word of a string to a variable, but it's not working. This code:
>
> $foo = "Hi There";
> ($foo) =~ /^(\w+)/;
> print "$foo\n";
>
>outputs "Hi There" instead of "Hi". I've also tried these, individually:
>
> $foo =~ /^(\w+)/;
> ($foo) =~ /^([^ ]+)/;
In all of these you match against $foo but don't capture the result
anywhere.
> $foo ~= s/^(\w+)/\1/;
>
>But, no luck with any of them; $foo remains unchanged. What am I doing
>wrong?
In this one you match the word at the beginning of the string and replace
it with itself (as an aside, you should use $1 on the right hand side of
the substitution, using -w will warn you about these things...)
You can say
($firstWord) = $foo =~ /^(\w+)/;
which will attempt to match $foo against the regex and make a list of the
parenthesised chunks of the regex. This list will then be used to assign
values into the list on the left of the = sign or undef if there aren;t
enough values. This leaves foo untouched, if you want to modify it in
place you might say
$foo =~ s/^(\w+).*/$1/s;
wherer the regex will attempt to match (and remember into $1) a string of
one or more \w characters at the front of $foo and any number (including
zero) of characters after that. Once the match is completed successfully
then whatever was matched is replaced by $1, if it fails (e.g. $foo
doesn't start with a \w character) then it's left untouched e.g.
DB<12> $foo = "Hello There\n"
DB<13> if ($foo =~ s/^(\w+).*/$1/s) {print "changed to $foo"}
changed to Hello
DB<14> $foo = " Hello There\n"
DB<15> if ($foo =~ s/^(\w+).*/$1/s) {print "changed to $foo"}
DB<16> X foo
$foo = ' Hello There
'
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com | Pencom Systems Administration (work)
========= WAS CANCELLED BY =======:
Rogue cancel from Michael Enlow, X-Cancelled-by etc. are forged.
Further information can be acquired at http://www.sputum.com/ucepage.htm
You can express your displeasure with Mr. Enlow by contacting him at:
enlow@direcpc.com
Control: cancel <62g7ve$pl2@news-central.tiac.net>
Newsgroups: comp.lang.perl.misc
Path: ...!news.rediris.es!newsfeed.mad.ibernet.es!News.Amsterdam.UnisourceCS!cosy.sbg.ac.at!news.cs.utwente.nl!opus.ies-energy.com!news.webspan.net!newsfeed.internetmci.com!204.59.152.222!news-peer.gsl.net!news-tokyo.gip.net!news.gsl.net!gip.net!nspixp!newsfeed.btnis.ad.jp!newsfeed1.btnis.ad.jp!news.fsinet.or.jp!ubc.co.jp!nobody
From: godmom@pagesz.net
Subject: cmsg cancel <62g7ve$pl2@news-central.tiac.net>
Approved: godmom@pagesz.net
Message-ID: <cancel.62g7ve$pl2@news-central.tiac.net>
X-No-Archive: Yes
Sender: mike@stok.co.uk (Mike Stok)
X-Cancelled-By: godmom@pagesz.net
Organization: UBC
Date: Tue, 21 Oct 1997 00:29:29 GMT
Lines: 2
This article cancelled within Tin.
------------------------------
Date: Mon, 20 Oct 1997 11:48:26 -0700
From: "Josh Baudhuin" <joshb@kadence.kom>
Subject: [Reposted due to Enlow UCE cancel]: Re: How do I match the first word in a string?
Message-Id: <REPOST-3078.9060363769531.62g91l$b7u$1@news.cadence.com>
You're confusing the search pattern with the entire string.
Just do:
($foo) = ($foo =~ /^(\w+)/);
or
$foo =~ s/^(\w+).*/\1/;
Brian Kendig wrote in message ...
>This should be simple, but it's got me stumped. I'm trying to assign
>the first word of a string to a variable, but it's not working. This code:
>
> $foo = "Hi There";
> ($foo) =~ /^(\w+)/;
> print "$foo\n";
>
>outputs "Hi There" instead of "Hi". I've also tried these, individually:
>
> $foo =~ /^(\w+)/;
> ($foo) =~ /^([^ ]+)/;
> $foo ~= s/^(\w+)/\1/;
>
>But, no luck with any of them; $foo remains unchanged. What am I doing
>wrong?
>
>--
>_/_/_/ Be insatiably curious. Je ne suis fait comme aucun
>/_/_/ Ask "why" a lot. de ceux que j'ai vus; j'ose croire
>_/_/ n'etre fait comme aucun de ceux qui
existent.
> / Brian Kendig Si je ne vaux pas mieux, au moins je suis
autre.
> / bskendig@netcom.com -- Rousseau
> http://people.netscape.com/brian/
========= WAS CANCELLED BY =======:
Rogue cancel from Michael Enlow, X-Cancelled-by etc. are forged.
Further information can be acquired at http://www.sputum.com/ucepage.htm
You can express your displeasure with Mr. Enlow by contacting him at:
enlow@direcpc.com
Control: cancel <62g91l$b7u$1@news.cadence.com>
Newsgroups: comp.lang.perl.misc
Path: ...!news.tamu.edu!newshost.comco.com!news.altair.com!thetimes.pixel.kodak.com!news.kodak.com!bloom-beacon.mit.edu!howland.erols.net!newsxfer3.itd.umich.edu!news-peer.gsl.net!news-tokyo.gip.net!news.gsl.net!gip.net!nspixp!newsfeed.btnis.ad.jp!newsfeed1.btnis.ad.jp!news.fsinet.or.jp!ubc.co.jp!nobody
From: godmom@pagesz.net
Subject: cmsg cancel <62g91l$b7u$1@news.cadence.com>
Approved: godmom@pagesz.net
Message-ID: <cancel.62g91l$b7u$1@news.cadence.com>
X-No-Archive: Yes
Sender: "Josh Baudhuin" <joshb@kadence.kom>
X-Cancelled-By: godmom@pagesz.net
Organization: UBC
Date: Tue, 21 Oct 1997 00:27:52 GMT
Lines: 2
This article cancelled within Tin.
------------------------------
Date: 20 Oct 1997 18:30:06 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: [Reposted due to Enlow UCE cancel]: Re: How do I match the first word in a string?
Message-Id: <REPOST-30346.073883056641.62g7ve$pl2@news-central.tiac.net>
In article <bskendigEID2EL.Bq@netcom.com>,
Brian Kendig <bskendig@netcom.com> wrote:
>This should be simple, but it's got me stumped. I'm trying to assign
>the first word of a string to a variable, but it's not working. This code:
>
> $foo = "Hi There";
> ($foo) =~ /^(\w+)/;
> print "$foo\n";
>
>outputs "Hi There" instead of "Hi". I've also tried these, individually:
>
> $foo =~ /^(\w+)/;
> ($foo) =~ /^([^ ]+)/;
In all of these you match against $foo but don't capture the result
anywhere.
> $foo ~= s/^(\w+)/\1/;
>
>But, no luck with any of them; $foo remains unchanged. What am I doing
>wrong?
In this one you match the word at the beginning of the string and replace
it with itself (as an aside, you should use $1 on the right hand side of
the substitution, using -w will warn you about these things...)
You can say
($firstWord) = $foo =~ /^(\w+)/;
which will attempt to match $foo against the regex and make a list of the
parenthesised chunks of the regex. This list will then be used to assign
values into the list on the left of the = sign or undef if there aren;t
enough values. This leaves foo untouched, if you want to modify it in
place you might say
$foo =~ s/^(\w+).*/$1/s;
wherer the regex will attempt to match (and remember into $1) a string of
one or more \w characters at the front of $foo and any number (including
zero) of characters after that. Once the match is completed successfully
then whatever was matched is replaced by $1, if it fails (e.g. $foo
doesn't start with a \w character) then it's left untouched e.g.
DB<12> $foo = "Hello There\n"
DB<13> if ($foo =~ s/^(\w+).*/$1/s) {print "changed to $foo"}
changed to Hello
DB<14> $foo = " Hello There\n"
DB<15> if ($foo =~ s/^(\w+).*/$1/s) {print "changed to $foo"}
DB<16> X foo
$foo = ' Hello There
'
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com | Pencom Systems Administration (work)
========= WAS CANCELLED BY =======:
Rogue cancel from Michael Enlow, X-Cancelled-by etc. are forged.
Further information can be acquired at http://www.sputum.com/ucepage.htm
You can express your displeasure with Mr. Enlow by contacting him at:
enlow@direcpc.com
Control: cancel <62g7ve$pl2@news-central.tiac.net>
Newsgroups: comp.lang.perl.misc
Path: ...!news.rediris.es!newsfeed.mad.ibernet.es!News.Amsterdam.UnisourceCS!cosy.sbg.ac.at!news.cs.utwente.nl!opus.ies-energy.com!news.webspan.net!newsfeed.internetmci.com!204.59.152.222!news-peer.gsl.net!news-tokyo.gip.net!news.gsl.net!gip.net!nspixp!newsfeed.btnis.ad.jp!newsfeed1.btnis.ad.jp!news.fsinet.or.jp!ubc.co.jp!nobody
From: godmom@pagesz.net
Subject: cmsg cancel <62g7ve$pl2@news-central.tiac.net>
Approved: godmom@pagesz.net
Message-ID: <cancel.62g7ve$pl2@news-central.tiac.net>
X-No-Archive: Yes
Sender: mike@stok.co.uk (Mike Stok)
X-Cancelled-By: godmom@pagesz.net
Organization: UBC
Date: Tue, 21 Oct 1997 00:29:29 GMT
Lines: 2
This article cancelled within Tin.
------------------------------
Date: Mon, 20 Oct 1997 11:48:26 -0700
From: "Josh Baudhuin" <joshb@kadence.kom>
Subject: [Reposted due to Enlow UCE cancel]: Re: How do I match the first word in a string?
Message-Id: <REPOST-9348.7146911621094.62g91l$b7u$1@news.cadence.com>
You're confusing the search pattern with the entire string.
Just do:
($foo) = ($foo =~ /^(\w+)/);
or
$foo =~ s/^(\w+).*/\1/;
Brian Kendig wrote in message ...
>This should be simple, but it's got me stumped. I'm trying to assign
>the first word of a string to a variable, but it's not working. This code:
>
> $foo = "Hi There";
> ($foo) =~ /^(\w+)/;
> print "$foo\n";
>
>outputs "Hi There" instead of "Hi". I've also tried these, individually:
>
> $foo =~ /^(\w+)/;
> ($foo) =~ /^([^ ]+)/;
> $foo ~= s/^(\w+)/\1/;
>
>But, no luck with any of them; $foo remains unchanged. What am I doing
>wrong?
>
>--
>_/_/_/ Be insatiably curious. Je ne suis fait comme aucun
>/_/_/ Ask "why" a lot. de ceux que j'ai vus; j'ose croire
>_/_/ n'etre fait comme aucun de ceux qui
existent.
> / Brian Kendig Si je ne vaux pas mieux, au moins je suis
autre.
> / bskendig@netcom.com -- Rousseau
> http://people.netscape.com/brian/
========= WAS CANCELLED BY =======:
Rogue cancel from Michael Enlow, X-Cancelled-by etc. are forged.
Further information can be acquired at http://www.sputum.com/ucepage.htm
You can express your displeasure with Mr. Enlow by contacting him at:
enlow@direcpc.com
Control: cancel <62g91l$b7u$1@news.cadence.com>
Newsgroups: comp.lang.perl.misc
Path: ...!news.tamu.edu!newshost.comco.com!news.altair.com!thetimes.pixel.kodak.com!news.kodak.com!bloom-beacon.mit.edu!howland.erols.net!newsxfer3.itd.umich.edu!news-peer.gsl.net!news-tokyo.gip.net!news.gsl.net!gip.net!nspixp!newsfeed.btnis.ad.jp!newsfeed1.btnis.ad.jp!news.fsinet.or.jp!ubc.co.jp!nobody
From: godmom@pagesz.net
Subject: cmsg cancel <62g91l$b7u$1@news.cadence.com>
Approved: godmom@pagesz.net
Message-ID: <cancel.62g91l$b7u$1@news.cadence.com>
X-No-Archive: Yes
Sender: "Josh Baudhuin" <joshb@kadence.kom>
X-Cancelled-By: godmom@pagesz.net
Organization: UBC
Date: Tue, 21 Oct 1997 00:27:52 GMT
Lines: 2
This article cancelled within Tin.
------------------------------
Date: Mon, 20 Oct 1997 23:32:53 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: [Reposted due to Enlow UCE cancel]: Re: Huge files, <>, and sysread()
Message-Id: <REPOST-31391.0419921875.EIDIqt.Bw6@world.std.com>
J-F Pitot de La Beaujardiere <delabeau@iniki.gsfc.nasa.gov> writes:
> foreach $line (<FILE>)
The foreach loop loops over a list, that means that the arugment
inside the parens is evaluated in a list context. The readline
operator in a list context returns all the remaining lines in the
file. What you are doing is similar to:
@lines = <FILE>; # fill @lines with the contents of FILE.
foreach $line (@lines)
>(1) Does <FILE> really read everything before starting the loop?
> Does it depend on the OS?
No, it depends on whether it is called in an array or list context.
>(2) Is there an alternative to <FILE> and sysread()?
> (a Perl-only alternative, that is; I wouldn't want to split(1) and
> a long file and process each piece).
Use while, a looping construct that calls the readline operator <> in
a scalar context.
while( defined( $line = <FILE> ) )
This will read one line into $line, and check if it is the end of file
or not. If it isn't the contents of the loop will be executed.
--
Andrew Langmead
========= WAS CANCELLED BY =======:
Rogue cancel from Michael Enlow, X-Cancelled-by etc. are forged.
Further information can be acquired at http://www.sputum.com/ucepage.htm
You can express your displeasure with Mr. Enlow by contacting him at:
enlow@direcpc.com
Control: cancel <EIDIqt.Bw6@world.std.com>
Newsgroups: comp.lang.perl.misc
Path: ...!news.tamu.edu!newshost.comco.com!news.altair.com!uwvax!uwm.edu!gsl-penn-ns.gsl.net!news-peer.gsl.net!news-tokyo.gip.net!news.gsl.net!gip.net!nspixp!newsfeed.btnis.ad.jp!newsfeed1.btnis.ad.jp!news.fsinet.or.jp!ubc.co.jp!nobody
From: godmom@pagesz.net
Subject: cmsg cancel <EIDIqt.Bw6@world.std.com>
Approved: godmom@pagesz.net
Message-ID: <cancel.EIDIqt.Bw6@world.std.com>
X-No-Archive: Yes
Sender: aml@world.std.com (Andrew M. Langmead)
X-Cancelled-By: godmom@pagesz.net
Organization: UBC
Date: Tue, 21 Oct 1997 00:21:24 GMT
Lines: 2
This article cancelled within Tin.
------------------------------
Date: 20 Oct 1997 23:37:42 GMT
From: jgloudon@bbn.remove.com (Jason Gloudon)
Subject: [Reposted due to Enlow UCE cancel]: Re: Huge files, <>, and sysread()
Message-Id: <REPOST-4718.8559875488281.62gq06$t2a$1@daily.bbnplanet.com>
J-F Pitot de La Beaujardiere (delabeau@iniki.gsfc.nasa.gov) wrote:
: A colleague just came to me with a Perl problem. He is attempting to read a
: huge (20MB) text file. Everything works if he attempts to process test
: lines snipped from the file, but if he tries to process the entire file it
: takes forever (forever = longer than patience permits). Stepping through
: with the debugger suggests that the line
: foreach $line (<FILE>)
: which begins his processing loop is what is slow, as if <FILE> must read
: everything before handling the first line. I suggested using sysread(),
: which worked for his fixed-record-length file, but that would be less
: convenient with variable-length records.
: Now I am curious. I could not find answers to the following questions
: by RTFM:
: (1) Does <FILE> really read everything before starting the loop?
: Does it depend on the OS?
Are you sure you read perlop ?
If a <FILEHANDLE> is used in a context that is looking for
a list, a list consisting of all the input lines is
returned, one line per list element. It's easy to make a
LARGE data space this way, so use with care.
: (2) Is there an alternative to <FILE> and sysread()?
: (a Perl-only alternative, that is; I wouldn't want to split(1) and
: a long file and process each piece).
while (<FILE>){
process $_;
}
: (3) Is there an equivalent to $| to somehow unbuffer the input?
No.
Jason Gloudon
========= WAS CANCELLED BY =======:
Rogue cancel from Michael Enlow, X-Cancelled-by etc. are forged.
Further information can be acquired at http://www.sputum.com/ucepage.htm
You can express your displeasure with Mr. Enlow by contacting him at:
enlow@direcpc.com
Control: cancel <62gq06$t2a$1@daily.bbnplanet.com>
Newsgroups: comp.lang.perl.misc
Path: ...!news.tamu.edu!newshost.comco.com!news.altair.com!uwvax!uwm.edu!news.sprintisp.com!sprintisp!nntprelay.mathworks.com!news-peer.gsl.net!news-tokyo.gip.net!news.gsl.net!gip.net!nspixp!newsfeed.btnis.ad.jp!newsfeed1.btnis.ad.jp!news.fsinet.or.jp!ubc.co.jp!nobody
From: godmom@pagesz.net
Subject: cmsg cancel <62gq06$t2a$1@daily.bbnplanet.com>
Approved: godmom@pagesz.net
Message-ID: <cancel.62gq06$t2a$1@daily.bbnplanet.com>
X-No-Archive: Yes
Sender: jgloudon@bbn.remove.com (Jason Gloudon)
X-Cancelled-By: godmom@pagesz.net
Organization: UBC
Date: Tue, 21 Oct 1997 00:21:42 GMT
Lines: 2
This article cancelled within Tin.
------------------------------
Date: 20 Oct 1997 23:37:42 GMT
From: jgloudon@bbn.remove.com (Jason Gloudon)
Subject: [Reposted due to Enlow UCE cancel]: Re: Huge files, <>, and sysread()
Message-Id: <REPOST-25521.221130371094.62gq06$t2a$1@daily.bbnplanet.com>
J-F Pitot de La Beaujardiere (delabeau@iniki.gsfc.nasa.gov) wrote:
: A colleague just came to me with a Perl problem. He is attempting to read a
: huge (20MB) text file. Everything works if he attempts to process test
: lines snipped from the file, but if he tries to process the entire file it
: takes forever (forever = longer than patience permits). Stepping through
: with the debugger suggests that the line
: foreach $line (<FILE>)
: which begins his processing loop is what is slow, as if <FILE> must read
: everything before handling the first line. I suggested using sysread(),
: which worked for his fixed-record-length file, but that would be less
: convenient with variable-length records.
: Now I am curious. I could not find answers to the following questions
: by RTFM:
: (1) Does <FILE> really read everything before starting the loop?
: Does it depend on the OS?
Are you sure you read perlop ?
If a <FILEHANDLE> is used in a context that is looking for
a list, a list consisting of all the input lines is
returned, one line per list element. It's easy to make a
LARGE data space this way, so use with care.
: (2) Is there an alternative to <FILE> and sysread()?
: (a Perl-only alternative, that is; I wouldn't want to split(1) and
: a long file and process each piece).
while (<FILE>){
process $_;
}
: (3) Is there an equivalent to $| to somehow unbuffer the input?
No.
Jason Gloudon
========= WAS CANCELLED BY =======:
Rogue cancel from Michael Enlow, X-Cancelled-by etc. are forged.
Further information can be acquired at http://www.sputum.com/ucepage.htm
You can express your displeasure with Mr. Enlow by contacting him at:
enlow@direcpc.com
Control: cancel <62gq06$t2a$1@daily.bbnplanet.com>
Newsgroups: comp.lang.perl.misc
Path: ...!news.tamu.edu!newshost.comco.com!news.altair.com!uwvax!uwm.edu!news.sprintisp.com!sprintisp!nntprelay.mathworks.com!news-peer.gsl.net!news-tokyo.gip.net!news.gsl.net!gip.net!nspixp!newsfeed.btnis.ad.jp!newsfeed1.btnis.ad.jp!news.fsinet.or.jp!ubc.co.jp!nobody
From: godmom@pagesz.net
Subject: cmsg cancel <62gq06$t2a$1@daily.bbnplanet.com>
Approved: godmom@pagesz.net
Message-ID: <cancel.62gq06$t2a$1@daily.bbnplanet.com>
X-No-Archive: Yes
Sender: jgloudon@bbn.remove.com (Jason Gloudon)
X-Cancelled-By: godmom@pagesz.net
Organization: UBC
Date: Tue, 21 Oct 1997 00:21:42 GMT
Lines: 2
This article cancelled within Tin.
------------------------------
Date: Mon, 20 Oct 1997 23:32:53 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: [Reposted due to Enlow UCE cancel]: Re: Huge files, <>, and sysread()
Message-Id: <REPOST-26358.195587158203.EIDIqt.Bw6@world.std.com>
J-F Pitot de La Beaujardiere <delabeau@iniki.gsfc.nasa.gov> writes:
> foreach $line (<FILE>)
The foreach loop loops over a list, that means that the arugment
inside the parens is evaluated in a list context. The readline
operator in a list context returns all the remaining lines in the
file. What you are doing is similar to:
@lines = <FILE>; # fill @lines with the contents of FILE.
foreach $line (@lines)
>(1) Does <FILE> really read everything before starting the loop?
> Does it depend on the OS?
No, it depends on whether it is called in an array or list context.
>(2) Is there an alternative to <FILE> and sysread()?
> (a Perl-only alternative, that is; I wouldn't want to split(1) and
> a long file and process each piece).
Use while, a looping construct that calls the readline operator <> in
a scalar context.
while( defined( $line = <FILE> ) )
This will read one line into $line, and check if it is the end of file
or not. If it isn't the contents of the loop will be executed.
--
Andrew Langmead
========= WAS CANCELLED BY =======:
Rogue cancel from Michael Enlow, X-Cancelled-by etc. are forged.
Further information can be acquired at http://www.sputum.com/ucepage.htm
You can express your displeasure with Mr. Enlow by contacting him at:
enlow@direcpc.com
Control: cancel <EIDIqt.Bw6@world.std.com>
Newsgroups: comp.lang.perl.misc
Path: ...!news.tamu.edu!newshost.comco.com!news.altair.com!uwvax!uwm.edu!gsl-penn-ns.gsl.net!news-peer.gsl.net!news-tokyo.gip.net!news.gsl.net!gip.net!nspixp!newsfeed.btnis.ad.jp!newsfeed1.btnis.ad.jp!news.fsinet.or.jp!ubc.co.jp!nobody
From: godmom@pagesz.net
Subject: cmsg cancel <EIDIqt.Bw6@world.std.com>
Approved: godmom@pagesz.net
Message-ID: <cancel.EIDIqt.Bw6@world.std.com>
X-No-Archive: Yes
Sender: aml@world.std.com (Andrew M. Langmead)
X-Cancelled-By: godmom@pagesz.net
Organization: UBC
Date: Tue, 21 Oct 1997 00:21:24 GMT
Lines: 2
This article cancelled within Tin.
------------------------------
Date: Mon, 20 Oct 1997 16:55:17 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: [Reposted due to Enlow UCE cancel]: Re: Including variable file name
Message-Id: <REPOST-3987.8782958984375.adelton.877366517@aisa.fi.muni.cz>
vv@romeo (Vijay Veeranna) writes:
> My require statement is a variable name and I am getting
> compilation errors when I do the following:
>
> $ENV_ROOT = = $ENV{'EMS_ROOT'};
> require '$ENV_ROOT/bin/db_access.pl'
>
> I am expecting it to substitute for the $ENV_ROOT
> variable. Any suggestions will be greatly appreciated.
If you want the $ENV_ROOT to interpolate, you have to write
require "$ENV_ROOT/bin/db_access.pl";
Hope this helps.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
========= WAS CANCELLED BY =======:
Rogue cancel from Michael Enlow, X-Cancelled-by etc. are forged.
Further information can be acquired at http://www.sputum.com/ucepage.htm
You can express your displeasure with Mr. Enlow by contacting him at:
enlow@direcpc.com
Control: cancel <adelton.877366517@aisa.fi.muni.cz>
Newsgroups: comp.lang.perl.misc
Path: ...!news.tamu.edu!newshost.comco.com!news.altair.com!thetimes.pixel.kodak.com!news.kodak.com!news-pen-16.sprintlink.net!newsfeed.nysernet.net!news.nysernet.net!news.sprintlink.net!Sprint!204.92.55.84!feed.nntp.acc.ca!199.60.229.5.MISMATCH!newsfeed.direct.ca!news-peer.gsl.net!news-tokyo.gip.net!news.gsl.net!gip.net!nspixp!newsfeed.btnis.ad.jp!newsfeed1.btnis.ad.jp!news.fsinet.or.jp!ubc.co.jp!nobody
From: godmom@pagesz.net
Subject: cmsg cancel <adelton.877366517@aisa.fi.muni.cz>
Approved: godmom@pagesz.net
Message-ID: <cancel.adelton.877366517@aisa.fi.muni.cz>
X-No-Archive: Yes
Sender: news@news.muni.cz (News Admin)
X-Cancelled-By: godmom@pagesz.net
Organization: UBC
Date: Tue, 21 Oct 1997 00:33:05 GMT
Lines: 2
This article cancelled within Tin.
------------------------------
Date: Mon, 20 Oct 1997 16:55:17 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: [Reposted due to Enlow UCE cancel]: Re: Including variable file name
Message-Id: <REPOST-23390.286163330078.adelton.877366517@aisa.fi.muni.cz>
vv@romeo (Vijay Veeranna) writes:
> My require statement is a variable name and I am getting
> compilation errors when I do the following:
>
> $ENV_ROOT = = $ENV{'EMS_ROOT'};
> require '$ENV_ROOT/bin/db_access.pl'
>
> I am expecting it to substitute for the $ENV_ROOT
> variable. Any suggestions will be greatly appreciated.
If you want the $ENV_ROOT to interpolate, you have to write
require "$ENV_ROOT/bin/db_access.pl";
Hope this helps.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
========= WAS CANCELLED BY =======:
Rogue cancel from Michael Enlow, X-Cancelled-by etc. are forged.
Further information can be acquired at http://www.sputum.com/ucepage.htm
You can express your displeasure with Mr. Enlow by contacting him at:
enlow@direcpc.com
Control: cancel <adelton.877366517@aisa.fi.muni.cz>
Newsgroups: comp.lang.perl.misc
Path: ...!news.tamu.edu!newshost.comco.com!news.altair.com!thetimes.pixel.kodak.com!news.kodak.com!news-pen-16.sprintlink.net!newsfeed.nysernet.net!news.nysernet.net!news.sprintlink.net!Sprint!204.92.55.84!feed.nntp.acc.ca!199.60.229.5.MISMATCH!newsfeed.direct.ca!news-peer.gsl.net!news-tokyo.gip.net!news.gsl.net!gip.net!nspixp!newsfeed.btnis.ad.jp!newsfeed1.btnis.ad.jp!news.fsinet.or.jp!ubc.co.jp!nobody
From: godmom@pagesz.net
Subject: cmsg cancel <adelton.877366517@aisa.fi.muni.cz>
Approved: godmom@pagesz.net
Message-ID: <cancel.adelton.877366517@aisa.fi.muni.cz>
X-No-Archive: Yes
Sender: news@news.muni.cz (News Admin)
X-Cancelled-By: godmom@pagesz.net
Organization: UBC
Date: Tue, 21 Oct 1997 00:33:05 GMT
Lines: 2
This article cancelled within Tin.
------------------------------
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 1208
**************************************