[11794] in Perl-Users-Digest
Perl-Users Digest, Issue: 5394 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 15 21:07:28 1999
Date: Thu, 15 Apr 99 18:00:18 -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 Thu, 15 Apr 1999 Volume: 8 Number: 5394
Today's topics:
Calling a function from s/// hassanov@yahoo.com
Re: can Perl handle huge files <jeromeo@atrieva.com>
Re: can Perl handle huge files <tchrist@mox.perl.com>
Core <cglcomputer@earthlink.net>
Re: Database Objects In Perl <mglenn@zbzoom.net>
Re: flocking question - worried <tchrist@mox.perl.com>
Re: How to split a large data file into smaller files ? (Tad McClellan)
LWP Help! eis99@my-dejanews.com
Re: Need to print \n - Not do a carrage return <wyzelli@yahoo.com>
Re: Out of Order (Tad McClellan)
pattern matching on filehandle <rasan@horizonlive.com>
perl under cygwin32 arkadig@my-dejanews.com
Re: Question about Connection <ebohlman@netcom.com>
Stock Market script <jacks@cybersource.com>
Re: Stock Market script <cassell@mail.cor.epa.gov>
Sys::Syslog; oddity (Chris Lewis)
Unable to run perl (Patrick Adom)
Re: warnings on Win32 <All@n.due.net>
Re: warnings on Win32 <All@n.due.net>
Re: warnings on Win32 <bowman@montana.com>
Re: warnings on Win32 <wyzelli@yahoo.com>
Re: Would anyone care to teach me perl? <aqumsieh@matrox.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 15 Apr 1999 21:57:00 GMT
From: hassanov@yahoo.com
Subject: Calling a function from s///
Message-Id: <7f5nb8$aao$1@nnrp1.dejanews.com>
After all these years with C (and then C++), here I am trying to learn Perl
:-( and seeking HELP. I've been trying to convert relative URL in HTML file
to absolute URL, but I can't do: $HtmlBuffer=~
s/(<\s*A\s*.*HREF\s*=\s*)\"([^"]*)\"/$1\"&AbsoluteUrl($2)\"/gi; Instead, I
do: while($HtmlBuffer=~ /(<\s*A\s*.*HREF\s*=\s*)\"([^"]*)\"/gi){
&AbsoluteUrl($2); } $HtmlBuffer=~
s/(<\s*A\s*.*HREF\s*=\s*)\"([^"]*)\"/$1\"$A_Hash{$2}\"/gi; ... sub
AbsoluteUrl{ local($Url)=@_; #Do the conversion here,... then
$A_Hash{$Url}="AbsoluteUrlGoesHere"; }
Is this the right way? Can I do it by the first approache?
Any help?
Thanks
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 15 Apr 1999 16:00:17 -0700
From: Jerome O'Neil <jeromeo@atrieva.com>
To: martin@cutup.de
Subject: Re: can Perl handle huge files
Message-Id: <37166F81.5E72D1AD@atrieva.com>
martin@cutup.de wrote:
>
> The ca. 20.000 documents are to be batch-converted to XML before being entered
> in the DB.
>
> I'm thinking of using Perl for the job but am a little wary of the:
>
> open(FILE,$file);
> @lines = <FILE>;
> close(FILE);
Why suck the whole file into memory when one line will do?
open(FILE,$file) or die "Yadda Yadda...";
while(<FILE>){
# XML 'till the cows come home.
}
close($file);
Much easier on your sysadmin.
Good Luck!
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: 15 Apr 1999 18:11:11 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: can Perl handle huge files
Message-Id: <3716801f@cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, martin@cutup.de writes:
:I'm thinking of using Perl for the job but am a little wary of the:
:open(FILE,$file);
:@lines = <FILE>;
:close(FILE);
That's not the standard pattern for linewise streamfile processing --
and for good reason. I suppose that you could, if you tried really
hard, probably devise a worse way to process a file a line at a time
than you've shown us here, but you'd certainly have to work at it.
--tom
--
"Whenever you find that you are on the side of the majority, it is time
to reform." --Mark Twain
------------------------------
Date: Thu, 15 Apr 1999 20:27:56 -0400
From: Chris Lambrou <cglcomputer@earthlink.net>
Subject: Core
Message-Id: <3716840C.2F58C050@earthlink.net>
One of our PERL scripts on our Web Server dumps the core, peridically.
1. When will PERL dump a core file? And under what circumstances?
2. How can we identify the offending script?
Gracias.
------------------------------
Date: 15 Apr 1999 22:04:27 GMT
From: Mike Glenn <mglenn@zbzoom.net>
Subject: Re: Database Objects In Perl
Message-Id: <7f5npb$4ou$1@ffx2nh3.news.uu.net>
>>In article <7f33f7$ske$1@eskinews.eskimo.com>,
>>Paul Boyes <boyes@eskimo.com> says...
>>
>>Hello,
>>
>>I have been looking for some examples of creating Database Objects in
>>Perl, buthave been unsuccessful in finding any. I am trying to get
>>away from using in-line sql by creating objects to represent my
>>database. In otherwords, if I had a simple person/address database, I
>>would havea person object with all of the person attributes(properties)
>>and methods and an address object with all of the address attributes and
>>methods.
>>
>>I have seen this done in other languages,but have not done it myself. It
>>seems like a good way to write managable code.Perl is fairly new to me so
>any help would be appreciated.
Hey Paul,
I recommend you pick up a copy of advanced perl programming(APP). I think It
covers exactly what your looking for. But as an added bonus I've included the
first version of just such a module that I wrote using the ideas from APP. This
module works very well for me and quite flexible. I have only tested it with
MySQL, but its written using DBI so any DBI supported DB should work. I've also
included a basic example script to show how Adapter works.
If other use this code with another DB please let me know how it works.
Here is a basic description of who Adapter works.
When you declare a new Adapter object to pass it the path to adapter.conf,
which contains info about the DB your connecting to and the column layouts of
the tables.
For every table you have you need to create a Module of the same name and it
has to have an "id" property. I've included a copy of such a module called
UserInfo.pm
Once you have an Adapter Object you can issue simple querys to the DB and also
store objects to the DB. (See example.pl)
Thats the basics. Once again I recommend you get a copy of APP, it will help to
understand what exactly I was attempting to build. Although the internal code
is not the same as the book the basic interface that it created is very
similar.
As a side note I am currently working on a new version of Adapter that will add
some new features, such as Transaction Processing and verify the objects data
before and insert or update. If one object fails to have valid data in a
transaction no other inserts or updates will happen. If anyone is interested
see this new code please let me know. Its not been tested yet but the basic
code is layed out...
I would really appreaciate any ideas and improvements to the code...
To Install:
copy Adapter.pm and UserInfo.pm to the perl lib path. (See @INC)
BEGIN FILE Adapter.pm
#!/usr/local/bin/perl
#----------------------------------------------------------
# Adapter Class Definition
# Adapter Class
# Written By: Mike Glenn
# Version: 1.0
# Date: 2-26-99
# Copyright 1999 Mike Glenn and HomeChicken Software
#
# This code is based on ideas presented by Sriram Srinivasan
# in Advanced Perl Programming, published by O'Reilly & Assoc.
# This code can be used and copied under the same terms as Perl.
#
# Mike Glenn <mglenn@zbzoom.net>
#----------------------------------------------------------
package Adapter;
use DBI;
sub new {
my $pkg = shift;
my $config_file = shift;
my $debug = 0;
my $r_setup = _HashFile($config_file);
my $driver = $r_setup->{'driver'};
my $database = $r_setup->{'database'};
my $hostname = $r_setup->{'hostname'};
my $username = $r_setup->{'username'};
my $password = $r_setup->{'password'};
my $dbh = DBI-
>connect("DBI:$driver:$database:$hostname",$username,$password);
die "Cannot connect: $DBI::errstr\n" unless $dbh;
my $r_obj = {
"dbh" => $dbh,
"setup" => $r_setup,
"debug" => $debug,
};
bless $r_obj, 'Adapter';
return $r_obj;
}
sub store {
my $pkg = shift;
my $obj = shift;
my $dbh = $pkg->{'dbh'};
my $r_setup = $pkg->{'setup'};
my $class = ref($obj);
my $r_columns = $r_setup->{$class};
my $column;
my $values;
my @values;
my $sql;
my $id = $obj->{'id'};
if($id eq 'NULL') {
foreach $column (@$r_columns) {
my $value = $obj->{$column};
if($value =~ /\D/) {
$value = $dbh->quote($value);
}
$values .= "$value,";
push(@values, "$column = $value") unless($column eq 'id');
}
chop($values);
$sql = "INSERT INTO $class VALUES($values)";
$dbh->do($sql) || print "$sql\n";
$values = join(" AND ", @values);
$sql = "SELECT id FROM $class WHERE $values";
my $cursor = $dbh->prepare($sql);
$cursor->execute || print "$sql\n";
while(($id) = $cursor->fetchrow ) {
$obj->{'id'} = $id;
}
}
else {
foreach $column (@$r_columns) {
if($column eq 'id') { next; }
else {
my $value = $obj->{$column};
if($value =~ /\D/) {
$value = $dbh->quote($value);
}
$values .= "$column = $value,";
}
}
chop($values);
my $sql = "UPDATE $class SET $values WHERE id = $id";
$dbh->do($sql) || print "$sql\n";
}
}
sub query {
my $this = shift;
my $class = shift;
my @queries = @_;
my $dbh = $this->{'dbh'};
my $r_setup = $this->{'setup'};
my $r_columns = $r_setup->{$class};
my @field = ();
my @store = ();
my @sql_values = ();
my $sql_values = '';
while(@queries) {
my $query = pop(@queries);
if($query =~ /^(.+)\s(.+)\s(.+)$/) {
my($key, $operand, @values) = split(/\s+/, $query);
my $value = join(" ",@values);
if($value =~ /\D/) {
$value = $dbh->quote($value);
print "QUOTED => $value\n" if($this->{debug});
}
push(@sql_values, "$key $operand $value");
}
elsif(($query eq 'AND') || ($query eq 'OR') || ($query eq 'NOT')) {
push(@sql_values, $query);
}
elsif(($query eq 'and') || ($query eq 'or') || ($query eq 'not')) {
push(@sql_values, $query);
}
}
if(@sql_values) {
unshift(@sql_values, "WHERE");
$sql_values = join(" ",@sql_values);
if($this->{'debug'}) {
print "Array: @sql_values\n";
print "CRIT: $sql_values\n";
}
}
my $sql = "SELECT * FROM $class $sql_values";
print "SQL: $sql\n" if $this->{'debug'};
my $cur = $dbh->prepare($sql);
$cur->execute;
my $field = $cur->fetchall_arrayref;
foreach $row (@$field) {
print "@$row\n" if $this->{'debug'};
my $obj = $class->new(@$row);
push(@store, $obj);
}
return @store;
}
sub delete {
my $pkg = shift;
my $obj = shift;
my $dbh = $pkg->{'dbh'};
my $r_setup = $pkg->{'setup'};
my $class = ref($obj);
my $r_columns = $r_setup->{$class};
my $column;
my $values;
my @values;
my $sql;
my $id = $obj->{'id'};
my $sql = "DELETE FROM $class WHERE id = $id";
$dbh->do($sql) || print "$sql\n";
}
sub debug {
my $this = shift;
($this->{'debug'})
? $this->{'debug'} = 0
: $this->{'debug'} = 1;
}
sub GetDatabaseConnection {
return $_[0]->{'dbh'};
}
sub _HashFile {
my $config_file = shift;
my %setup;
open(IN, $config_file) || die "Adapter: Unable to open configuration file:
$config_file!\n";
while(<IN>) {
if(/^#/) { next; }
elsif(/^\[/) {
$_ =~ /\[(.+)\]/;
my $table = $1;
my $line = <IN>;
chomp($line);
my @columns = split(/,\s+?/, $line);
my $r_obj = \@columns;
$setup{$table} = $r_obj;
}
elsif(/([A-Za-z]+)\s+?=\s+?(.+)/) {
$setup{$1} = $2;
}
}
close(IN);
my $r_hash = \%setup;
return $r_hash;
}
sub print {
my $pkg = shift;
my $obj = shift;
my $r_setup = $pkg->{'setup'};
my $class = ref($obj);
my $r_columns = $r_setup->{$class};
my $column;
$~ = "OBJECT";
foreach $column (@$r_columns) {
$key = $column;
$value = $obj->{$column};
write;
}
$~ = "STDOUT";
print"\n";
}
sub print_html {
my $pkg = shift;
my $obj = shift;
my $r_setup = $pkg->{'setup'};
my $class = ref($obj);
my $r_columns = $r_setup->{$class};
print "<TABLE>\n";
my $column;
foreach $column (@$r_columns) {
$key = $column;
$value = $obj->{$column};
print "<TR><TD>$key</TD><TD>$value</TD></TR>\n";
}
print"</TABLE>\n";
}
sub DESTROY {
my $r_obj = shift;
my $dbh = $r_obj->{'dbh'};
$dbh->disconnect();
}
format OBJECT =
@>>>>>>>>>>>: @<<<<<<<<<<<<<<<<<
$key, $value
.
1;
END FILE Adapter.pm
BEGIN FILE UserInfo.pm
#----------------------------------------------------------
# Class Definition
# UserInfo Class
# Written By: Mike Glenn
# Version: 1.0
# Date: 2-26-99
# Copyright 1999 Mike Glenn and HomeChicken Software
#
# This file may be used and copied under the same terms as
# Perl.
#----------------------------------------------------------
package UserInfo;
sub new {
my $pkg = shift;
my $id = shift;
my $fname = shift;
my $lname = shift;
my $address = shift;
my $phone = shift;
if(($id eq 'NULL') || ($id eq 'null')) {
return 0 unless($phone = VerifyPhone($phone));
}
my $r_user = {
'id' => $id,
'fname' => $fname,
'lname' => $lname,
'address' => $address,
'phone' => $phone,
};
bless $r_user, 'UserInfo';
return $r_user;
}
sub format_phone {
my $pkg = shift;
$pkg->{'phone'} =~ /(...)(...)(....)/;
return "($1) $2-$3";
}
sub VerifyPhone {
my $phone = shift;
my $code;
if( $phone =~ /(\(?\d{0,3})\)?.?-?(\d{3}).?-?(\d{4})/ ) {
($1 eq '')
? $code = $1
: $code = 724;
return "$code$2$3";
}
return 0;
}
1;
END FILE UserInfo.pm
BEGIN FILE adapter.conf
driver = mysql
database = <name of database>
hostname = <hostname>
username = <username>
password = <password>
#
[UserInfo]
id, fname, lname, address, phone
END FILE adapter.pm
BEGIN FILE example.pl
#!/usr/local/bin/perl -w
use Strict;
use Adapter;
# declare a new Adapter to connect to the DB.
my $adapter = Adapter->new("/home/mglenn/adapter.conf");
# Query the DB for Rows in UserInfo that meet the crit...
# Return an array of objects that met the crit...
my @users = $adapter->query( "UserInfo",
"phone = 5551212",
"AND",
"lname = "Glenn");
# you could use:
# my($user) = $adapter->quer...
# if you know your only getting back one object.
# Process the objects, etc...
$users[0]->{'fname'} = "Mike";
print "$users[0]->{'fname'} $users[0]->{'lname'}\n";
# Store the object back to the DB.
$adapter->store($users[0]);
exit;
END FILE example.pl
------------------------------
Date: 15 Apr 1999 18:34:06 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: flocking question - worried
Message-Id: <3716857e@cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, danbeck@scott.net (Daniel Beckham) writes:
:ooh, can you do that? That race condition has always bothered me. I was
:under the assumption that you had to unlock it first...
What race condition?
--tom
--
The computing field is always in need of new cliches. -- Alan Perlis
------------------------------
Date: Thu, 15 Apr 1999 17:26:08 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to split a large data file into smaller files ?
Message-Id: <ghl5f7.619.ln@magna.metronet.com>
David Phillips (cooperagent@my-dejanews.com) wrote:
: I have a large (50MB) flat text file arranged in alpha order, starting at
: AA... and ending in ZZ.... and I need to split that file into smaller files,
: each containing data for that pair of leading letters only. Fields within
: the records are tab delimited.
: For example all the records starting with AA end up in a file named AA.TXT,
: all the AB records go into AB.TXT and so on.
: hmmm. some pointers as to how this might be done in perl would be very
: welcome here.
This should do it:
---------------------
#!/usr/bin/perl -w
use strict;
my $basename = ''; # no open filehandle yet
while (<DATA>) {
m/^([A-Z]{2})/ or die "invalid record: $_";
if ( $1 ne $basename) { # need to open a new file
open(OUT, ">$1.TXT") || die "could not open '$1.TXT' $!";
$basename = $1;
}
print OUT;
}
close(OUT);
__DATA__
AA one
AA two
AB one
AB two
BA one
BA two
BB one
BB two
---------------------
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 16 Apr 1999 00:44:05 GMT
From: eis99@my-dejanews.com
Subject: LWP Help!
Message-Id: <7f614j$imj$1@nnrp1.dejanews.com>
Can someone help me. I am fried trying to understand this.
I want to be able to take contents from a form and post them to multiple cgi.
I understand I must use LWP, useragent but am not sure how. I located this
but don't understnad it too much: use HTTP::Request::Common qw(POST); use
LWP::UserAgent;
$ua = LWP::UserAgent->new();
my $req = POST 'http://www.perl.com/cgi-bin/cpan_mod',
[ module => 'DB_File', readme => 1 ];
$content = $ua->request($req)->as_string;
Could someone please help me out here? Thanks a million!
Jason.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 16 Apr 1999 09:33:17 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Need to print \n - Not do a carrage return
Message-Id: <87vR2.32$Qn2.5666@vic.nntp.telstra.net>
Sorry for my ignorance but I am assuming that the print string we are
outputting within double quotes needs to display the characters <br> rather
than perform the function lessthan br greaterthan...
What is the technical difference between your output and mine? (aside from
the number of keystrokes)
This is a serious question meant to improve my own understanding (I say this
because tone is difficult to convey in NG posts and this could easily be
mistaken for sarcasm which it isn't).
Interested in the responses
Wyzelli
Philip Newton wrote in message <3715F1BA.8FED95E7@datenrevision.de>...
>Wyzelli wrote:
>>
>> What you might want to do actually is output the HTML code for a line
>> break (ie <br>) this will need to be escaped (ie \<br\>)
>
>not <br> rather than \<br\>? From whom are we escaping it? From
>the HTML, no? Either way, not a Perl problem any more.
>
>Cheers,
>Philip
------------------------------
Date: Thu, 15 Apr 1999 17:04:04 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Out of Order
Message-Id: <48k5f7.619.ln@magna.metronet.com>
Bill and Rowena Kennedy (bkennedy@one.net.au) wrote:
: then if there is an error on the "rename" line the error message "Can't
: rename ..." prints out before the "writemsg" line.
: Of course I'm sure we can come up with a work around but does anyone know
: why this happens.
Because error messages go to STDERR, which is (usually)
unbuffered.
Your other output goes to STDOUT, which is buffered.
Turn autoflush on near the top of your script, and the
messages will appear in the "right" order:
$| = 1; # enable auto-flush (see 'perlvar.pod' for details)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 15 Apr 1999 22:22:31 GMT
From: Rasan Rasch <rasan@horizonlive.com>
Subject: pattern matching on filehandle
Message-Id: <37166A04.A8B8F1BA@horizonlive.com>
Hi,
If I have a file of size 0 (created by using touch) and I have something
like:
#!/opt/bin/perl -w
open(DATA, "data") || die("can't open data: $!");
my ($foo) = <DATA> =~ /foo/;
Why doesn't this produce a warning message such as "Use of uninitialized
value at..." where I try to perform a match on the filehandle. Wouldn't
the read on DATA return some kind of undefined value as if I merely
assigned $foo = <DATA>?
Thanks
------------------------------
Date: Fri, 16 Apr 1999 00:21:24 GMT
From: arkadig@my-dejanews.com
Subject: perl under cygwin32
Message-Id: <7f5vps$hk9$1@nnrp1.dejanews.com>
My system is Windows98. I installed perl5.005_56 under CygWin32-b20 using
egcs-2.91.60. The syswrite() and consequently Net::FTP don't work correctly.
Anybody successfully installed Perl under cygwin32 and wants to share the
experience?
Arkadi
arkadi_g@usa.net
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 15 Apr 1999 23:43:19 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Question about Connection
Message-Id: <ebohlmanFA98K7.IMA@netcom.com>
James Hill <jrhill@writeme.com> wrote:
: How does one get perl to read an HTML file from another server than the
: one it resides on? Thanks!!
With the LWP module.
------------------------------
Date: Thu, 15 Apr 1999 16:33:00 -0700
From: Jack Schlotthauer <jacks@cybersource.com>
Subject: Stock Market script
Message-Id: <3716772C.60C71B9@cybersource.com>
Can anyone tell me where to get a script that grabs real
stock market information and spits out an HTML table?
--
Jack Schlotthauer 260-6174
jacks@cybersource.com
Webmaster BarberShop
http://barbershop.cybersource.com
------------------------------
Date: Thu, 15 Apr 1999 16:49:30 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Stock Market script
Message-Id: <37167B0A.4B619837@mail.cor.epa.gov>
Jack Schlotthauer wrote:
>
> Can anyone tell me where to get a script that grabs real
> stock market information and spits out an HTML table?
>
> --
> Jack Schlotthauer 260-6174
> jacks@cybersource.com
> Webmaster BarberShop
> http://barbershop.cybersource.com
As a start, you can get a copy of The Perl Journal - spring 1999
issue (lucky #13). Look at the article 'Five Quick Hacks: Downloading
Web Pages". Hack number 5 is an entire Perl program to fetch info from
a specific on-line stock-quote website, and parse out the info of
interest. 30 lines, including comments and whitespace.
Taking the ouput and shoving that into an HTML table is an exercise
left to the reader. :-)
HTH,
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: 15 Apr 1999 22:07:08 GMT
From: clewis@nortel.com (Chris Lewis)
Subject: Sys::Syslog; oddity
Message-Id: <7f5nuc$5oi$1@bcarh8ab.ca.nortel.com>
I'm running Perl 5.004 on HPUX 10.20.
This line:
use Sys::Syslog;
Comes back with:
Constant subroutine _INCLUDE_AES_SOURCE redefined at (eval 14) line 1
[The code continues to run, but I have to get rid of the message.]
Seems to be something to do with the twisty little passages of #ifdef
in the h2ph'd version of sys/stdsym.h.
Is this a generic problem? Any quick/general hints on how to resolve this?
Or, how can I simply get the code to discard the message?
Thanks.
--
For more information on spam, see http://spam.abuse.net/spam
Fight spam, support Rep. Chris Smith's TCPA extension: http://www.cauce.org
It's not just anyone who gets a Starship Cruiser class named after them.
------------------------------
Date: Thu, 15 Apr 1999 02:36:35 -0800
From: padom@unmf.co.uk (Patrick Adom)
Subject: Unable to run perl
Message-Id: <NAtR2.769$dd.310694@WReNphoon3>
I need help am unable to get Perl running on my windows nt IIS server. I
have installed activestates activeperl in the command prompt I can run and
example perl program but from with my web-browser this same program does not
work.
**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
------------------------------
Date: Thu, 15 Apr 1999 22:21:55 GMT
From: "Allan M. Due" <All@n.due.net>
Subject: Re: warnings on Win32
Message-Id: <7EtR2.96$oW4.74@news.rdc1.ct.home.com>
Gus <spg@quokka.com> wrote in message
news:3716518a.58650915@news.earthlink.net...
: Seems simple but I can't figure how to turn on warnings in Win32
: scripts (command line is not a problem)
:
: Unix is a layup:
: #! /usr/bin/perl -w
:
: but since Win32 doesn't recognize the shebang, how would I turn on
: warnings?
Well, that is not quite true. The #! is recognized (in fact is has to be
there) it just doesn't have to point to the correct directory (unless of
course you are using Apache for Windows - then Apache requires that the path
is correct). As near as I can tell only requirement to have the -w
recognized is to make sure that the final character combination the
characters "perl". After that no more characters after spaces before the -w
so:
#! /usr/local/bin/perl -w
#! /usr/bin/perl -w
#! perlboy.be_my_name_and_trouble_is_my_game -w
#! Fritzperls.was_psycho -w
#! perl -w
#! Death_perl -w
will all work
Oddly for Winhoze, capitalization matters so:
#! Perl_is.great
won't work, but
#! perl_is.great is fine.
For myself, I just install perl into the same directory structure that is
forced on me in my rare journeys to the Unix world (/usr/local/bin/) and I
leave the shebang line alone so it isn't messed up when I move back and
forth, plus it works on my home installed Apache server.
HTH
AmD
--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--Random Quote--
I dunno, I dream in Perl sometimes...
Larry Wall in <8538@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: Thu, 15 Apr 1999 22:24:50 GMT
From: "Allan M. Due" <All@n.due.net>
Subject: Re: warnings on Win32
Message-Id: <SGtR2.99$oW4.14@news.rdc1.ct.home.com>
Allan M. Due <All@n.due.net> wrote in message
news:7EtR2.96$oW4.74@news.rdc1.ct.home.com...
: Gus <spg@quokka.com> wrote in message
: news:3716518a.58650915@news.earthlink.net...
: : Seems simple but I can't figure how to turn on warnings in Win32
: : scripts (command line is not a problem)
: :
: : Unix is a layup:
: : #! /usr/bin/perl -w
: :
: : but since Win32 doesn't recognize the shebang, how would I turn on
: : warnings?
:
: Well, that is not quite true. The #! is recognized (in fact is has to be
: there) it just doesn't have to point to the correct directory (unless of
: course you are using Apache for Windows - then Apache requires that the
path
: is correct). As near as I can tell only requirement to have the -w
: recognized is to make sure that the final character combination the
: characters "perl".
Um, very tired. The above should read: make sure that the final character
combination contains the characters "perl"
AmD
------------------------------
Date: Thu, 15 Apr 1999 16:28:25 -0600
From: "bowman" <bowman@montana.com>
Subject: Re: warnings on Win32
Message-Id: <xKtR2.49$2E2.1340@newsfeed.slurp.net>
Gus <spg@quokka.com> wrote in message
news:3716518a.58650915@news.earthlink.net...
> Oh yeah, getting a real OS is not an option ;
You could at least get a real shell and lose command.com. There are ports of
bash to
win32 and DOS.
------------------------------
Date: Fri, 16 Apr 1999 09:40:05 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: warnings on Win32
Message-Id: <wdvR2.33$Qn2.5416@vic.nntp.telstra.net>
I saw another post elsewhere where it was suggested to use #! -w
Is this not going to work?
Or would #! perl -w
be the way to make it work properly?
I think I agree with leaving the shebang as standard as possible even though
I have the Gooey version OS from Micky$oft since it makes no difference to
me and me changing it could cause grief to some other poor sod
Wyzelli
erk wrote in message <37165b58@discussions>...
>
>Exec as:
>perl -w scriptname
>
>
>spg@quokka.com (Gus) wrote:
>>Seems simple but I can't figure how to turn on warnings in Win32>scripts
(command line is not a problem)
>>
>>Unix is a layup:
>>#! /usr/bin/perl -w
>>
>>but since Win32 doesn't recognize the shebang, how would I turn on
>>warnings?
>>
>>Thanks in advance
>>
>>gus
>>
>>Oh yeah, getting a real OS is not an option ;
>>
>
------------------------------
Date: Thu, 15 Apr 1999 17:38:45 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Would anyone care to teach me perl?
Message-Id: <x3yzp49a7iy.fsf@tigre.matrox.com>
Raymond Yu <WizeGuy@nettaxi.com> writes:
> Would anyone care to teach me perl? Just with email though.
Why? Don't you know how to read books? It's very simple. In English,
words go from left to write, but you knew that already.
Pages can be flipped. A book is made up of one or more pages. Words in
books look almost exactly like words in email messages. They can be
read too.
------------------------------
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 5394
**************************************