[7746] in Perl-Users-Digest
Perl-Users Digest, Issue: 1371 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 27 00:07:26 1997
Date: Wed, 26 Nov 97 21:00:22 -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 Wed, 26 Nov 1997 Volume: 8 Number: 1371
Today's topics:
?: in lhs (Dirk Vleugels)
Re: [Q] Saving state of composite data structure? <rootbeer@teleport.com>
Re: Anyone know how to configure mod_perl? (Mike Stok)
Re: CGI and communication ports (Jeremy D. Zawodny)
Re: core dumped with split <rootbeer@teleport.com>
Counting Keys in Tied Hash <stevenjm@olywa.net>
FAQ: Re: New to Perl (Keith Willis)
Re: GUID bit <rootbeer@teleport.com>
How do i Preform a search <mike@novahome.com>
Re: How do i Preform a search (Mike Torrence)
Re: How to execute CGI script written in perl on NT ser <rootbeer@teleport.com>
Re: How To Test if number is ODD or EVEN? (Brian Wheeler)
Re: Is there a nice way to make MSWord print? <garyng@ibm.net>
Re: maintain unique elements in an array? no duplicates <robert.friberg@your_clothes.eductus-vast.com>
Perl & dBase files <t1812@nospam.net>
Re: print "Location: http://www.my_html.html\n\n"; <rootbeer@teleport.com>
Re: Q: How to move files around ? (Mike Stok)
Re: read from end of file (by line) <barnett@houston.Geco-Prakla.slb.com>
Re: Sorting an 'almost but not really' complicated data (Hans Juergen von Lengerke)
Re: System runs as sub-process... (Sitaram Chamarty)
Re: System runs as sub-process... <merlyn@stonehenge.com>
Re: using print "Location http://www.adress_of_url\n"; <doug1@net-link.net>
Want this script (Mark)
Re: Want this script (Jeremy D. Zawodny)
Web Architect Needed <cgaston@lds.com>
Yet Another Newbie Question (Jarkko Juntunen)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 25 Nov 1997 15:53:03 GMT
From: vleugels@do.isst.fhg.de (Dirk Vleugels)
Subject: ?: in lhs
Message-Id: <880472768.186641@firewall.do.isst.fhg.de>
Hi,
i wonder why the following will not work:
while (<>) {
push(/^!/ ? @reject : @accept,$_);
}
fails with:
po (vleugels):~/src/perl > cat t | ./foo.pl
Type of arg 1 to push must be array (not null operation) at ./foo.pl line 4,
near "$_)"
Execution of ./foo.pl aborted due to compilation errors.
Perlop says:
The operator may be assigned to if both the 2nd and 3rd
arguments are legal lvalues (meaning that you can assign to
them):
Anyone clue me in?
Dirk
------------------------------
Date: Tue, 25 Nov 1997 09:12:14 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Gary Montgomery <lordosis@gladstone.uoregon.edu>
Subject: Re: [Q] Saving state of composite data structure?
Message-Id: <Pine.GSO.3.96.971125091147.26061T-100000@usertest.teleport.com>
On Tue, 25 Nov 1997, Gary Montgomery wrote:
> I have a hash of hashes data structure. I need to save the state of this
> structure so that each time the script is launched the data structure is
> ready and available.
Look for the FreezeThaw modules on CPAN. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 25 Nov 1997 18:23:15 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Anyone know how to configure mod_perl?
Message-Id: <65f52j$evj@news-central.tiac.net>
In article <347B0BFE.CA9992F9@shurflo.com>,
Thomas Beardshear <u2537@shurflo.com> wrote:
>I've been trying to install the mod_perl (and server-status) modules on
>Apache with no luck. I got the latest Apache (1.2.4) but mod_perl wasn't
>there. So I downloaded mod_perl and tried to make, make test... but it
>couldn't find LWP and aborted with some errors. So I downloaded
>libwww-perl... and it aborted with some reference to MIME/base64.pm.
>
>Where does it end? Is there some complete package I can download and
>install? I don't mind recompiling but I can't seem to find a complete
>package that includes Apache and mod_perl?
If you trust a program to do the work including installation then
http://perl.apache.org says:
Availability
The distribution of mod_perl and the Apache::* Perl modules are
available on any CPAN site around the world. You'll find mod_perl
releases under modules/by-module/Apache/. New releases make their way
around CPAN when they are upload to PAUSE from here.
There are several other Perl modules that mod_perl may need you to
have installed, sorry, I won't tell you which ones, I'll do better.
Provided you have Andreas Kvnig's CPAN.pm module, simply run:
cpan> install Bundle::Apache
This will fetch and install mod_perl and related packages for you all
at once.
I never use the CPAN module but other people seem to use it quite well as
it makes life easier.
The CPAN module's documentation begins like this:
NAME
CPAN - query, download and build perl modules from CPAN
sites
SYNOPSIS
Interactive mode:
perl -MCPAN -e shell;
[etc.]
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@colltech.com | Collective Technologies (work)
------------------------------
Date: Tue, 25 Nov 1997 15:53:53 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: CGI and communication ports
Message-Id: <347ef465.433939321@igate.hst.moc.com>
[original author automagically cc'd via e-mail]
On Tue, 25 Nov 1997 16:01:02 +0100, "Reimer AG, Patrick Stalder"
<internet@reimer.ch> wrote:
>It is possible to access to a COM-Port on a PC (MS-Dos or Windows) over
>the perl language?
Yes.
If that's all you wanted to know, why did you put "CGI" in the subject
line of your message? It had/has nothing to do with CGI...
Jeremy
--
Jeremy D. Zawodny jzawodn@wcnet.org
Web Server Administrator www@wcnet.org
Wood County Free Net (Ohio) http://www.wcnet.org/
------------------------------
Date: Tue, 25 Nov 1997 08:13:22 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Edmund Grimley-Evans <etg10@cl.cam.ac.uk>
Subject: Re: core dumped with split
Message-Id: <Pine.GSO.3.96.971125081028.26061H-100000@usertest.teleport.com>
On 24 Nov 1997, Edmund Grimley-Evans wrote:
> Should Perl distinguish between parentheses whose results one
> would like to catch and parentheses which are only there to
> override operator precedence?
Perl can't tell the difference, but you can. :-) Perl has non-memory
parens, which look like the second line below.
(foo|bar) # Matches foo or bar, with memory
(?:foo|bar) # Matches the same thing, but no memory
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Tue, 25 Nov 1997 13:49:38 -0800
From: Steven May <stevenjm@olywa.net>
Subject: Counting Keys in Tied Hash
Message-Id: <347B47F2.7CECA930@olywa.net>
Greetings,
I've set up a simple simple data base using SDBM.
using:
tie(%Hash,AnyDBM_File,$HASH,$permissions,0644) || die "Hash tie: $!\n";
on Unix,
and
tie(%Hash,SDBM_File,$HASH,$permissions,0644) || die "Ski tie: $!\n";
on Windoze, ( I know, permissions, but it works, and I'll fix it later)
and so on.....
When I attempt to count the keys I get some interesting results.
The database (at this point) contains roughly 650 keys.
If I attempt to take the scalar of the keys function:
$num_keys = scalar keys %hash;
I discover that $num_keys equals '22'.
If I try to stuff the keys into an array and count the array elements:
@array = keys %hash;
$count = @array;
I get $count equals '44'. This is not the end of the world, since I
keep a record count in the hash itself and increment or decrement as
needed. But it is annoying to get unexpected results.
If I walk the hash and do something like
my($c) =1;
while (($key, $value) = each %hash) {
print "Pair $c: $key is associated with $value. \n";
$c++;
}
I get a printout of all 650 key/value pairs.
Tom Christiansen states in perltie that tied arrays are incomplete. . I
do seem to remember an oblique mention of the need to walk the hash for
a count when tied. I believe this mention was in the Camel book, but
can't find it again if it was.
Anyway, can anyone enlighten me on this? Or am I missing something
totally obvious here?
TIA,
Steve
--
Blackwater-Pacific Services
------------------------------
Date: Tue, 25 Nov 1997 15:42:51 GMT
From: keith_willis.junk@non-hp-unitedkingdom-om1.om.hp.com (Keith Willis)
Subject: FAQ: Re: New to Perl
Message-Id: <347ff125.360201802@elf.bri.hp.com>
On Fri, 21 Nov 1997 19:12:41 -0500, calbij@ix.netcom.com wrote:
>I am new to perl and would like to know if there is a way that I can set
>unix enviornment variables and have them stay set in the users shell
>when the perl script ends. I have tried setting the %ENV but this only
>seems to last for the life of the script. Any help would be appricated.
>From http://www.perl.com/CPAN-local/doc/manual/html/pod/perlfaq8.html
I {changed directory, modified my environment} in a perl script. How
come the change disappeared when I exited the script? How do I get my
changes to be visible?
Go check it out....
----------------------------------------------------------------------
The above message reflects my own views, not those of Hewlett Packard.
When emailing me, please note that there is no '.junk' in my address.
------------------------------
Date: Tue, 25 Nov 1997 08:15:45 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Jason Varsoke <jjv@caesun.msd.ray.com>
Subject: Re: GUID bit
Message-Id: <Pine.GSO.3.96.971125081431.26061I-100000@usertest.teleport.com>
On Mon, 24 Nov 1997, Jason Varsoke wrote:
> Insecure dependency in open while running setgid at /dev/fd/3 line 206.
That's Perl, trying again to save you from yourself. :-) Have you seen
what the perldiag and perlsec manpages have to say about this? Hope this
helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Tue, 25 Nov 1997 12:45:19 -0400
From: "Mike" <mike@novahome.com>
Subject: How do i Preform a search
Message-Id: <65ev2e$fgn2@sapphire.mtt.net>
I am trying to perform a search on some user input for words found in a kill
file.
foreach $killword (@KILLWORDS)
{
if ( $testwords =~ /$killwords/i)
{
print " \n test word found in file $testword with $killword\n";
}
@killwords comes from a file which contains the words I want searched for.
$test words is a test string containing one of the words found in @killwords
can any one help me??
please email me at caticus@nsis.com
or mike@novahome.com
Thanks
------------------------------
Date: Tue, 25 Nov 1997 18:20:04 GMT
From: mst@fadavis.com (Mike Torrence)
Subject: Re: How do i Preform a search
Message-Id: <347b16b0.16162352@news.idt.net>
On Tue, 25 Nov 1997 12:45:19 -0400, "Mike" <mike@novahome.com> wrote:
>I am trying to perform a search on some user input for words found in a kill
>file.
>
> foreach $killword (@KILLWORDS)
> {
> if ( $testwords =~ /$killwords/i)
> {
> print " \n test word found in file $testword with $killword\n";
> }
>
>@killwords comes from a file which contains the words I want searched for.
>$test words is a test string containing one of the words found in @killwords
>
>can any one help me??
>
>please email me at caticus@nsis.com
>or mike@novahome.com
>
>Thanks
>
>
>
$killwords returns the number of elements in the array @killwords.
--------------------------------------------------------------------------
**************************************************************************
The preceding does not necessarily reflect my employer's opinion. No one
else ever agrees with me, what would make my employer different?
--------------------------------------------------------------------------
Mike Torrence
mst@fadavis.com
mtorrenc@iname.com
F.A. Davis (http://www.fadavis.com)
--------------------------------------------------------------------------
------------------------------
Date: Tue, 25 Nov 1997 08:43:36 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: drive@mbox4.singent.com.sg
Subject: Re: How to execute CGI script written in perl on NT server?
Message-Id: <Pine.GSO.3.96.971125083953.26061P-100000@usertest.teleport.com>
On 24 Nov 1997, Drive wrote:
> Am new in writing CGI scripts and therefore need help badly in advising
> me how to execute my script written in perl on an Windows NT
> server......
The same way you execute your scripts which aren't written in Perl on that
server. If the server's docs don't tell you how, though, you should get a
new server with better docs.
> #!usr/local/bin/perl
Not checking for warnings?
> $basedir = "g:\\drive\\cgi-bin";
It's nicer to use single quotes and forward slashes for filenames.
> open(LOG, "<$basedir/$countfile");
Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.
> close (LOG);
> flock (LOG,8);
Closing the file releases the lock; you needn't explicitly unlock it.
Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 25 Nov 1997 18:35:43 GMT
From: bdwheele@indiana.edu (Brian Wheeler)
Subject: Re: How To Test if number is ODD or EVEN?
Message-Id: <65f5pv$kj$1@dismay.ucs.indiana.edu>
In article <comdog-ya02408000R2411971501330001@news.panix.com>,
comdog@computerdog.com (brian d foy) writes:
> In article <01bcf675$0ea174c0$c82da8c0@akilles.ittek.org>, "Robert Friberg" <robert.friberg@your_clothes.eductus-vast.com> wrote:
>
>>print $number && 1 ? 'Odd!': 'Even!', "\n";
>
> i guess you didn't bother to test this. thanks for posting crap.
Nice manners. Probably a typo, because
print $number & 1 ? 'Odd!' : 'Even!', "\n";
works as advertised.
&& is shortcut AND. It would only show up as Even if $number was undefined
or 0. & is logical AND.
Before go and criticize people's __FREELY GIVEN HELP__, why don't you try to
figure it out on your own? odd/even is probably the most trivial problem
there is. Sorry if I'm ragging, but it really irks me when people get shitty
with free advice.
Brian Wheeler
bdwheele@indiana.edu
>
> #!/usr/bin/perl
>
> foreach $number ( 0..10 )
> {
> print $number && 1 ? 'Odd!': 'Even!', "\n";
> }
>
> __END__
>
> Even!
> Odd!
> Odd!
> Odd!
> Odd!
> Odd!
> Odd!
> Odd!
> Odd!
> Odd!
> Odd!
>
------------------------------
Date: 25 Nov 1997 14:54:10 GMT
From: "Gary Ng" <garyng@ibm.net>
Subject: Re: Is there a nice way to make MSWord print?
Message-Id: <01bcf9b2$e309daa0$f31952ca@dkkong>
Jan Dubois <jan.dubois@ibm.net> wrote in article
<347c1193.4754526@news3.ibm.net>...
> [OLE code skipped]
Just to remind, using the OLE method, autoexec
macro will be called which can be very dangerous.
If all one want is printing, I would strongly recommend
doing it through ShellExecute which would not invoke
any macros.
Gary
------------------------------
Date: 25 Nov 1997 16:33:52 GMT
From: "Robert Friberg" <robert.friberg@your_clothes.eductus-vast.com>
Subject: Re: maintain unique elements in an array? no duplicates?
Message-Id: <01bcf9bf$6e232cc0$c82da8c0@akilles.ittek.org>
Jon writes:
> Is it possible to maintain an array that will always have non-redundant
> elements in it? If a new element is to be added, it doesn't get added
> if there is already an identical element in the array. Suppose I wanted
> to keep an array of people's names that are being read from various
> files, I don't want a persons name duplicated in the list. So, Is
> there a method to prevent redundant entries? or a method to remove
> redundancies? I guess a 'set' datatype is what I'm thinking of.
Use a hash instead of an array.
# demonstration as a unix session
% cat > unique.pl
#!/usr/bin/perl -w
while (<>) {
($name, $adr ) = split /:/;
$adr{$name} = $adr;
}
for (sort keys %adr){
print "$_\t$adr{$_}\n";
}
^D
% cat names
Robert Friberg:robert.friberg@eductus-vast.com
Benny Hill:bh@funny.co.uk
Bill Gates:bgates@first.microsoft.com
Bill Gates:bgates@second.microsoft.com
Bill Gates:bgates@third.microsoft.com
Bill Clinton:president@whitehouse.com
Benny Hill:bh@notfunny.co.uk
benny hill:BH@lessfunny.co.uk
% unique.pl < names
Benny Hill bh@funny.co.uk
Bill Gates bgates@third.microsoft.com
Robert Friberg robert.friberg@eductus-vast.com
benny hill BH@lessfunny.co.uk
#end of session
Hope this helps,
-robban
#######################################
#
# Robert Friberg
# robert.friberg@eductus-vast.com
#
#######################################
------------------------------
Date: 25 Nov 1997 23:09:41 GMT
From: Rene Hertell <t1812@nospam.net>
Subject: Perl & dBase files
Message-Id: <65flrl$5ee@myy.helia.fi>
Howdy!
I'm not sure if this is there right place toast this kind of question, so
please excuse me...
OK, My problem is to find a free perl script that makes html-pages from a
query to for example a dBase file (Excel file, comma file, etc.)
The file would contain a list of products my friend is selling. The table
would contain fields like:
product_category
product_name
model_number
price
image.gif
etc.
Thanks four your time,
Reni Hertell
t1812@myy.helia.spam-hater.fi
(please remove that spam-related stuff from my emailadress if you reply by
@-mail... :)
------------------------------
Date: Tue, 25 Nov 1997 08:10:02 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Robert Saunders <robert@iminet.com>
Subject: Re: print "Location: http://www.my_html.html\n\n"; and open a browser.. ?
Message-Id: <Pine.GSO.3.96.971125080827.26061G-100000@usertest.teleport.com>
On Mon, 24 Nov 1997, Robert Saunders wrote:
> I am wanting to open another window.. with the this command line
>
> print "Location: my_html.html\n\n";
That's valid Perl, so you don't seem to have a Perl problem. If you're
trying to tell a browser what to do, though, you should check into HTTP,
which is the protocol used for talking to browsers. If you can't find what
you want in the docs, check with a newsgroup about HTTP. Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 25 Nov 1997 18:30:06 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Q: How to move files around ?
Message-Id: <65f5fe$f6g@news-central.tiac.net>
If you have a "reasonable" and recent perl 5 then yopu should be able to
say
perldoc File::Copy
at the prompt and discover a perl 5 module which may be of use
Hope this helps,
Mike
In article <880480648.21440.0.nnrp-02.9e98e5dc@news.demon.co.uk>,
Stewart Hutton <stewart@circustuff.co.uk> wrote:
>I've hacked quite a number of scripts by now - but have never had to
>move files around the disk.
>
>Until now. =:>
>
>Can someone point me to any references or samples please?
>
>It's a really simple task - I just want to be able to hit a button
>which will copy all files from one directory to another - it's just
>that I have never had a need to learn this stuff before ...
>
>I'm more comfortable with Perl 4 syntax than 5, but both are available
>to me.
>
>TIA
>
>Stewart
>
>
>---------------------------------------------------------------------------
> CIRCUSTUFF: WHERE BOOKS CAN SKILL
> 83 Uist Rd, Glenrothes, Fife, KY7 6RE, UK. Phone/Fax: +44 (0)1592 620711
> EMail:webmaster@circustuff.co.uk URL: http://www.circustuff.co.uk/
>---------------------------------------------------------------------------
>
--
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@colltech.com | Collective Technologies (work)
------------------------------
Date: Tue, 25 Nov 1997 09:32:10 -0600
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: read from end of file (by line)
Message-Id: <347AEF77.6F897A1C@houston.Geco-Prakla.slb.com>
Scott Anthony Hamilton wrote:
> sah@uow.edu.au (Scott Anthony Hamilton) writes:
>
> >I'm in the process of writing a small module for reading from
> >the end of the file line by line to the beginning. Much like
> >$scalar = <FH> but in reverse.
>
> >Before I go on, is there a perl trick which can accomplish this
> >task with ease?
>
> I've had a reply to this from somebody who misinterpreted the
> question. I may not have made myself clear enough.
>
> What I am looking to do is open a file, then read the last line,
> the the 2nd last line, then the 3rd last line, and so on ...
> until I read the first line in the file.
>
> --
> Scott Hamilton / sah@uow edu au / KeyID C3107E75
> 87 FE 1D C3 DE 20 37 FB 6F 30 6A 8A D1 38 9A B5
Well.....
I believe the following should do what you want:
open (INPUT_FILE,"junk_input") or die "Cannot open file: $!\n";
@file = reverse <INPUT_FILE>; # slurps the entire file (in reverse
order)
foreach $line (@file) {
print $line;
}
For input file junk_input:
line 1
line 2
line 3
line 4
line 5
line 6
Results in:
line 6
line 5
line 4
line 3
line 2
line 1
As always, TMTOWTDI.... :-)
HTH.
--
"Security through obscurity is no security at all."
-comp.lang.perl.misc newsgroup posting
------------------------------------------------------------------------
* Dave Barnett U.S.: barnett@houston.Geco-Prakla.slb.com *
* DAPD Software Support Eng U.K.: barnett@gatwick.Geco-Prakla.slb.com *
* Schlumberger Geco-Prakla (281) 596-1434 (Office Number) *
* 1325 S. Dairy Ashford (281) 596-1807 (Fax) *
* Houston, TX 77077 *
------------------------------------------------------------------------
------------------------------
Date: Tue, 25 Nov 1997 18:16:35 GMT
From: lenkerWEEDS@dircon.co.uk (Hans Juergen von Lengerke)
Subject: Re: Sorting an 'almost but not really' complicated data structure
Message-Id: <347b157b.1840655@news.dircon.co.uk>
Tom Phoenix wrote:
>You're referencing the global arrays @a and @b here; that's not what you
>want. I think you mean to use arrows, to use references: $a->[1], for
>example, instead of $a[1]. Hope this helps!
Sadly, it doesn't (see my response to Abigails post). I had already
tried that (actually the only reason for posting $a[1] was because
that happened to be the last try of a long series of successless
dereferencing tries).
Hans
--
To mail me, just pull the WEEDS!
------------------------------
Date: 25 Nov 1997 15:43:57 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: System runs as sub-process...
Message-Id: <slrn67jiv5.1b5.sitaram@ltusitaram.diac.com>
On 22 Nov 1997 11:34:19 -0700, Randal Schwartz <merlyn@stonehenge.com> wrote:
[question snipped]
>You're gonna die when you see how simple it was:
>
> system("vcvars32 x86; nmake /nologo /f test.mak");
Am I dreaming or did Randal just answer what's essentially a Visual C/M$
related question?
:-)
Sita.
------------------------------
Date: 25 Nov 1997 10:08:26 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: System runs as sub-process...
Message-Id: <8cwwhwewad.fsf@gadget.cscaper.com>
>>>>> "Sitaram" == Sitaram Chamarty <sitaram@diac.com> writes:
Sitaram> On 22 Nov 1997 11:34:19 -0700, Randal Schwartz <merlyn@stonehenge.com> wrote:
Sitaram> [question snipped]
>> You're gonna die when you see how simple it was:
>>
>> system("vcvars32 x86; nmake /nologo /f test.mak");
Sitaram> Am I dreaming or did Randal just answer what's essentially a
Sitaram> Visual C/M$ related question?
Egad! Was *that* what that stuff was? I had *no* clue. I just
cut-n-pasted command lines, honest, officer!
:-)
I'm also still not sure how vcvars32 affects the environment, but
there must be Deep Magic there. If it's a csh alias, this obviously
won't work, since system() uses the One True Shell (/bin/sh).
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 279 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
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@ora.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: Tue, 25 Nov 1997 11:47:22 -0500
From: Douglas Clifton <doug1@net-link.net>
To: Olivier <PAYS@FILNET.fr>
Subject: Re: using print "Location http://www.adress_of_url\n";
Message-Id: <347B0119.4F72B94F@net-link.net>
> Please could you tell me if a daclaration is necessary to use
> print ""Location http://www.adress_of_url\n";
> using perl 5
> with an example if it is possible
I'm assuming you are referring to a CGI script.If you want to redirect
the user to a different
URL you must NOT send any MIME
headers first (e.g. "Content-type: text/html\n\n")
Note the two newlines, same is true w/
redirection. So the guts of your CGI script
might look like this
----------------------------------------
#!/usr/bin/perl
# do some stuff...
# now redirect the surfer to a new URL
print "Location: http://www.yahoo.com\n\n";
----------------------------------------
~d
------------------------------
Date: 25 Nov 1997 15:40:42 GMT
From: gt2863a@acmey.gatech.edu (Mark)
Subject: Want this script
Message-Id: <65erhq$lq8@catapult.gatech.edu>
I would like to find if it is available or
something like that I could modify, I PERL script
that connects with a web page and captures the HTML
from it.
thanks
mark
--
mec --gt2863a
------------------------------
Date: Tue, 25 Nov 1997 16:02:14 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: Want this script
Message-Id: <347ff675.434467270@igate.hst.moc.com>
[original author automagically cc'd via e-mail]
On 25 Nov 1997 15:40:42 GMT, gt2863a@acmey.gatech.edu (Mark) wrote:
>I would like to find if it is available or
>something like that I could modify, I PERL script
>that connects with a web page and captures the HTML
>from it.
The GET script that comes with LWP does that just fine.
Jeremy
--
Jeremy D. Zawodny jzawodn@wcnet.org
Web Server Administrator www@wcnet.org
Wood County Free Net (Ohio) http://www.wcnet.org/
------------------------------
Date: Tue, 25 Nov 1997 10:47:44 -0800
From: Chris Gaston <cgaston@lds.com>
Subject: Web Architect Needed
Message-Id: <347B1D4F.2DDCE102@lds.com>
Logical Design Solutions, a leader in the design and development
of Interactive Business Communications has immediate full-time
openings in their New York, NY and Morristown, NJ offices for
Web Architects.
Job Description:
In this visible role, the ideal candidate will possess 2+ years
experience in configuration of Internet technologies as part
of a multi-tiered information technology architecture. Keeping
up-to-date with current technology trends is essential, as is the
ability to evaluate appropriate technology components for
development and delivery environments. This individual must also
have the ability to integrate application support technologies with
preexisting client IT infrastructure. Experience with C/C++, Perl,
HTML, Java, CGI and knowledge of Internet protocols and
standards is required. Knowledge of CORBA and Active X is a big
plus.
Send resume with cover letter and salary requirements to:
Technical Recruiter
Logical Design Solutions
Phone: (973) 971-0100
Fax: (973) 971-0103
Email: recruiter@lds.com
For more information on this and other positions please visit:
http://www.lds.com
------------------------------
Date: 25 Nov 1997 15:49:46 GMT
From: jarkko@avalon.merikoski (Jarkko Juntunen)
Subject: Yet Another Newbie Question
Message-Id: <65es2q$1gi@pan.otol.fi>
I'm trying to write program for cleaning up html-files back to
plain text files --so the program should remove everything inside
angle brackets.
This line: s/<.*?>//sgx; works something like, BUT it won't remove
anything if tag begins in one line and continue to next line.
Like this:
<img src="products/images/dapl1.gif"
align="bottom" width="175" height="40">
So, plase somebody help Me, and tell how that is possible in Perl.
I feel that it must be possible!
--
-------------------------------------------------------------------------
Jarkko Juntunen jarkko@avalon.merikoski.fi Tel. +358 8 5306 977
-------------------------------------------------------------------------
------------------------------
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 1371
**************************************