[11513] in Perl-Users-Digest
Perl-Users Digest, Issue: 5113 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 11 17:07:23 1999
Date: Thu, 11 Mar 99 14:00:19 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 11 Mar 1999 Volume: 8 Number: 5113
Today's topics:
Re: can I integrate javascript into cgi output? <jglascoe@giss.nasa.gov>
Re: CGI https-detector <webmaster@cgninteractive.com>
CGI.pm param persistence question <chogan@primenet.com>
Re: Complex Structure Question <aqumsieh@matrox.com>
Re: Complex Structure Question <bruceh@interaccess.com>
debugger mystery... <jamesht@idt.net>
Re: Delete Text Block Between a pair of Parenthesis <jglascoe@giss.nasa.gov>
Determine Perl version with CGI script & script problem <rvdb@nedernet.nl>
Re: Determine Perl version with CGI script & script pro <tobin@sji.org>
File Query "Product Version" <johnsmith@microsoft.com>
Re: Help with basic perl problems. (Bart Lateur)
Help with Modules (Paul Falbe)
Help! pm_to_blib is too demanding on where POD is locat <just-substitute-my-first-name@gay.com>
IO::SOCKET question: how can my server determine client jim-h@mailexcite.com
Link validation kelby@mplx.com
Re: Module to find duplicate files? (Greg Ward)
Re: Mysql question <tobin@cory.eecs.berkeley.edu>
Re: Newbie Q about CGI-lib.pl <emschwar@mail.uccs.edu>
Re: Objects: overriding a constructor (Damian Conway)
OEM to ANSI in Perl? jorgearango@my-dejanews.com
OEM to ANSI in Perl? jorge@imagenes.com
Re: Perl refuses to work in my browser, only in MSDos <mgeorgiadis@hotmail.com>
Re: perl to c compiler; where do you get it? <jglascoe@giss.nasa.gov>
Re: Scheduled Task (brian d foy)
Using Kermit <vacevedo@tyr.mty.itesm.mx>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 11 Mar 1999 16:30:58 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: Diane Unger <geotrace@shentel.net>
Subject: Re: can I integrate javascript into cgi output?
Message-Id: <36E83612.7733760F@giss.nasa.gov>
[courtesy copy of post sent to cited author]
Diane Unger wrote:
>
> Is it possible to include javascript in the output of a perl cgi
> program? I've been trying it and have been unable to get javascript
> that works elsewhere (without cgi) to work as part of the output of
> cgi. Any tricks to be aware of?
my $js_code =<< 'EOJS';
<!--
document.write(document.title, "<br>");
document.write(self.location, "<br>");
// -->
EOJS
print STDOUT $js_code;
Jay Glascoe
--
"Narf!"
--Pinky
------------------------------
Date: Thu, 11 Mar 1999 14:05:35 -0500
From: Spaghettio <webmaster@cgninteractive.com>
Subject: Re: CGI https-detector
Message-Id: <36E813FF.A6084D7D@cgninteractive.com>
But... I don't want the user getting a cryptic pop-up error message from the browser. I'd rather be able
to return a useful page of html describing the problem in-depth and giving the user a phone number and
e-mail address he can use if he has questions.
brian d foy wrote:
> In article <36E80A80.C90DB0E9@cgninteractive.com>, Spaghettio <webmaster@cgninteractive.com> posted:
>
> > Can anyone tell me where I can find a script that detects whether or not
> > a browser can handle https protocol? I've searched CPAN, but have come
> > up confused and empty-handed.
>
> don't bother. let the server worry about establishing an SSL
> connection.
>
> --
> brian d foy
> CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
--
Mssr. Spag. Reverso
webmaster@cgninteractive.com
------------------------------
Date: 11 Mar 1999 19:45:17 GMT
From: Craig Hogan <chogan@primenet.com>
Subject: CGI.pm param persistence question
Message-Id: <7c96gd$bba$1@nnrp02.primenet.com>
Hi,
I have a very large Perl CGI script that I wrote (about 3,500 lines)
that I am converting to use the CGI.pm module. I can't quite grasp
the persistence of form variables through script invocations.
My script is setup so that the first thing it does is:
$Query = new CGI;
Then I look at an 'action' parameter to figure out what state I am in,
and call the appropriate subroutine... What I don't understand is
what $Query->hidden is doing for me. Before I used CGI.pm, I had to
set every variable in a hidden field to see it next time. But with
CGI.pm, you can retain the variable by simply saying:
print $Query->hidden('myvariable');
In other words, you don't have to reset the value! I guess it uses
the current value as the default.
Fine. But I mention this because if I want to CHANGE the value of a
variable going through hidden, I have to do
$Query->delete('myvariable') first.
My question is: Why do I have to do this if every time the script is
invoked I am declaring a new object? Shouldn't the new object be
created with all the current hidden values? Deleting first works, but
it bothers me that I don't understand what's going on.
thanks,
Craig
--
.....................................................................
[ Craig Hogan ! Cure TAB archive, live Cure recordings: ]
[ chogan@primenet.com ! http://www.primenet.com/~chogan/index.html ]
[ Software Engineer ! "Smear this man across the wall" ]
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
------------------------------
Date: Thu, 11 Mar 1999 12:58:54 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Complex Structure Question
Message-Id: <x3yoglzewm9.fsf@tigre.matrox.com>
Bruce Hodo <bruceh@interaccess.com> writes:
> I want to save the following info into a "complex record":
> -"dest"s in each gate ( $data{$gate} = @dests #array of "dest"s ?)
> -"area"s in each dest ( $data{$gate}{$dest} = @areas #array of "area"s?)
This is not the way to store arrays of hashes. You can't store an
array in a hash since hash values are scalars. So you have to store
references to the arrays.
Read 'perldsc' at least once before re-thinking your strategy.
Reading 'perlref' would also be helpful.
$data{$gate} = \@dests; # or = [@dests];
$data{$gate}{$dest} = \@areas; # or = [@areas];
Then, to access those arrays back, you need to dereference them:
@dests = @{$data{$gate}};
@areas = @{$data{$gate}{$dest}};
HTH,
Ala
------------------------------
Date: Thu, 11 Mar 1999 15:47:01 -0500
From: Bruce Hodo <bruceh@interaccess.com>
Subject: Re: Complex Structure Question
Message-Id: <36E81DB4.AADC9F29@interaccess.com>
The Sixty-Four Dollar Question is: Isn't saving the reference basically saving
the location (reference), and not the values of the array? The reason I didn't
do that is because I resuse some of the arrays. I want to save the original
values so I can recall them latter. It was my impression that dereferencing
them would get me the last values stored, not the ones I wanted.
Ala Qumsieh wrote:
> Bruce Hodo <bruceh@interaccess.com> writes:
>
> > I want to save the following info into a "complex record":
> > -"dest"s in each gate ( $data{$gate} = @dests #array of "dest"s ?)
> > -"area"s in each dest ( $data{$gate}{$dest} = @areas #array of "area"s?)
>
> This is not the way to store arrays of hashes. You can't store an
> array in a hash since hash values are scalars. So you have to store
> references to the arrays.
>
> Read 'perldsc' at least once before re-thinking your strategy.
> Reading 'perlref' would also be helpful.
>
> $data{$gate} = \@dests; # or = [@dests];
> $data{$gate}{$dest} = \@areas; # or = [@areas];
>
> Then, to access those arrays back, you need to dereference them:
>
> @dests = @{$data{$gate}};
> @areas = @{$data{$gate}{$dest}};
>
> HTH,
> Ala
--
Bruce Hodo - Webmaster, GetAwayNetwork, Inc.
==Providing unique vacation information on the World Wide Web==
For Villas, Resorts, Hotels, Air/Hotel Packages, Charter Airfares
And Now Offering Travel Auctions!
=============== Visit us at http://getawaynet.com ===============
------------------------------
Date: Thu, 11 Mar 1999 15:33:52 -0500
From: James Tolley <jamesht@idt.net>
Subject: debugger mystery...
Message-Id: <36E828B0.992F7B6E@idt.net>
Hello all,
The debugger displays some of my code out of order. It also seems to
skip over some while loops.
Has anyone sen anything like this? What's causing it?
Thanks,
James
------------------------------
Date: Thu, 11 Mar 1999 15:19:17 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: kqchung@my-dejanews.com
Subject: Re: Delete Text Block Between a pair of Parenthesis
Message-Id: <36E82545.46B1F0D7@giss.nasa.gov>
[courtesy copy of post sent to cited author]
kqchung@my-dejanews.com wrote:
>
> Before
> ------
> (savetext
> (deletetext
> (sdfds)
> ((ffdffdfads)
> (dfsffdsfff))
>
> ) # close parenthesis for deletetext
> ) # close parenthesis for savetext
>
> After
> -----
> (savetext
> )
see perlfaq4 "How do I find matching/nesting anything?"
> I am sorry if this question had been asked in the past. If
> it is could you give me a pointer to that article.
--
which is worse: ignorance or apathy?
who knows. who cares.
------------------------------
Date: Thu, 11 Mar 1999 20:13:18 +0100
From: "RJHM van den Bergh" <rvdb@nedernet.nl>
Subject: Determine Perl version with CGI script & script problem
Message-Id: <921179333.20156.0.rover.c29fe22b@news.demon.nl>
Hi,
The first version of my script did work perfectly on hypermart.
The second version does only run on my local Linux computer.
Even with the strict paradigma it doesn't give an error.
I also installed a cgi-wrap to test it also no problem on my local server.
So I do asume Hypermart is using another version of perl.
How do I determine the version they are using. ?
I do want to write a script that gives me that information.
The script is used to make a chat applet possible.
The old version does run at
http://server11.hypermart.net/edah/
The error log on hypermart shows
[Wed Mar 10 14:00:51 1999] access to /data1/hypermart.net/edah/chat.pl
failed for 194.159.226.43, reason: Premature end of script headers Search
pattern not terminated in file /data1/hypermart.net/edah/chat.pl at line 90,
next char ^? syntax error in file /data1/hypermart.net/edah/chat.pl at line
90, next 2 tokens "s/read:/0/m; syntax error in file
/data1/hypermart.net/edah/chat.pl at line 97, next 2 tokens "}" Execution of
/data1/hypermart.net/edah/chat.pl aborted due to compilation errors. [Wed
Mar 10 14:02:54 1999] access to /data1/hypermart.net/edah/chat.pl failed for
194.159.226.43, reason: Premature end of script headers
I do not get errors on my Linux system.
Here is the new script
I'm new to Perl so don't blame me for the mess.
Rob.
rvdb@nedernet.nl
or
(root@jads.demon.nl)
-------------------------
#! /usr/bin/perl -w
use strict;
#always sent the mime header.
print "Content-type: text/plain\n\n";
#get the query string
my $query=$ENV{'QUERY_STRING'};
if (! defined($query)) {$query="read:0";}
#convert %20 to spaces
#while ($query =~ m/%20/) { $query=~ s/%20/ /;}
$query=~ s/%20/ /g;
# Look if there is no a chatdata file
# if not then try to initialize it
if (! -e 'chatdata.txt')
{
# try to create the chat data file.
open (CHATDATA, ">chatdata.txt");
print CHATDATA "9:1\n";
print CHATDATA "Welcome to MiniChat. \n";
print CHATDATA " \n";
print CHATDATA "(c)1999 RJHM van den Bergh.\n";
print CHATDATA "All Rights Reserved \n";
print CHATDATA "rvdb\@nedernet.nl \n";
print CHATDATA "http://www.nedernet.nl/~rvdb \n";
print CHATDATA "or \n";
print CHATDATA "root\@jads.demon.nl \n";
print CHATDATA " \n";
print CHATDATA " \n";
close CHATDATA ;
chmod(0666,'chatdata.txt');
# check if it is suceeded.
if (-e 'chatdata.txt')
{
$query="read:0";
} else
{
print "9:1\n";
print "An error occured.\n";
print "The script coudn't create the chatdata.txt file\n";
print "\n";
print "Execute chat.pl from the UNIX prompt.\n";
print "This will create the chatdata.txt file.\n";
print "\n";
print "This script version automaticly tries to set the\n" ;
print "right file permissions ( \"chmod 666 chatdata.txt\") .\n";
print " \n";
print "rvdb\@nedernet.nl \n";
exit();
}
}
# try to access the chatdata.txt file
for ( my $i=1;$i<=3;$i++)
{
# check if it is already locked
# if so wait for it to be freed
if (-e ".chatlock")
{
sleep 1;
} else
{
# ok we can now lock the file
open ( LOCKFILE , '>.chatlock');
print LOCKFILE "0";
close LOCKFILE;
last;
}
}
# note if the file says locked for three secconds
# we assume the lock file is corrupted
# read the file
open (CHATDATA, '<chatdata.txt') || print "Error coudn't read
chatdata.txt\n";
my @data=<CHATDATA>;
close(CHATDATA);
# get the number of changes
my @line0=split(/:/,$data[0],2);
my $currentline=$line0[0];
my $changnumber=$line0[1];
# see if he wants data
if ($query=~ m/^read:/)
{
# see if the client doesn't have latest data
$query=~ s/read:/0/m;
if ($changnumber!=$query)
{
foreach (@data)
{
print $_;
}
} else
{
print "No new data.";
}
} else
{
# otherwise we asume he wants to write the data
open (CHATDATAOUT, ">chatdata.txt");
# increase the current line
$currentline++;
if ($currentline>9) { $currentline=0; }
# increase the changnumber
$changnumber++;
# to not let the computer overflow in time
if ( $changnumber>=10000) { $changnumber=1 };
# now change the first line
$data[0]="$currentline:$changnumber\n";
# now change the currentline
$data[$currentline+1]="$query\n";
# now output everything
foreach (@data)
{
print CHATDATAOUT "$_";
}
# finaly close the connection
close (CHATDATAOUT);
}
# unlock the file so another process can access it
unlink ('.chatlock');
------------------------------
Date: Thu, 11 Mar 1999 13:56:44 -0800
From: Tobin Fricke <tobin@sji.org>
Subject: Re: Determine Perl version with CGI script & script problem
Message-Id: <36E83C1C.BF113B2@cory.eecs.berkeley.edu>
> So I do asume Hypermart is using another version of perl.
> How do I determine the version they are using. ?
If you have shell access, just run perl with the -v option (ie,
/usr/bin/perl -v) and it will spew forth its version number and other
information. If you need to determine the version number from within a
Perl program, use the $] special variable (try "print $]"), or
$PERL_VERSION if you're doing Use English, documented on page 136 of the
Camel book.
> The error log on hypermart shows
> [Wed Mar 10 14:00:51 1999] access to /data1/hypermart.net/edah/chat.pl
> failed for 194.159.226.43, reason: Premature end of script headers Search
It's often easier to debug errors like this if you use nph (non-parsed
headers).
Tobin
------------------------------
Date: Thu, 11 Mar 1999 11:44:16 -0800
From: "Joe User" <johnsmith@microsoft.com>
Subject: File Query "Product Version"
Message-Id: <7c96f9$bk9$1@thefuture.qualcomm.com>
Anyone have code that could explain how to query the "Product Verison" of an
exe file in win32?
Need the info that the floowing provides:
Right click file
select properties
click version tab
click product version in "Item Name:"
and it shows Version x.x.x.x.x in the "Value:" field
Thanks in advance!
------------------------------
Date: Thu, 11 Mar 1999 20:40:30 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Help with basic perl problems.
Message-Id: <36ea287e.897639@news.skynet.be>
David Dodd wrote:
>Thanks for all your help. The problem ended up being the control characters
>at the end of lines. I switched my editor to save for Unix and the scripts
>ran fine!
>
>What editor is recommened?
"Editor"? You better upload your scripts in Ascii mode (FTP).
Bart.
------------------------------
Date: 11 Mar 99 19:34:44 GMT
From: paul@cassens.com (Paul Falbe)
Subject: Help with Modules
Message-Id: <26427.921180884@cassens.com>
Keywords: Perl Modules Variables
Hi,
I'm trying to create a module that will set Globals variables. I have
a lot of Perl scripts and each one of them has to set these static variables.
What I want to do is create a module and use it to set these variables.
I have two questions 1) how do I set up the module. And 2) how do
I use them in my script. e.g. I want to set $MYVAR="/opt" in the module.
Thanks!
-Paul
--
Internet: | Paul J. Falbe |
falbe@cassens.com | Cassens Transport | Std disclaimers apply.
Voice: | 145 N. Kansas Str. | (But you knew that!)
618-656-3006 | Edwardsville, IL 62025 |
------------------------------
Date: Thu, 11 Mar 1999 14:11:25 -0800
From: Ert Dredge <just-substitute-my-first-name@gay.com>
Subject: Help! pm_to_blib is too demanding on where POD is located in .pm files
Message-Id: <36E83F8D.9284D6E9@gay.com>
Hiya.
I'm trying to set up a module for distribution using a h2xs-created
template, and then ultimately have the usual perl Makefile.PL;
make...etc. installation procedure available to end users.
I prefer to weave my perl POD docs throughout my code (in particular I
like to introduce my method subroutines with a descriptive section that
I want showing up in the docs) instead of having it all bunched up at
the end or hanging out in a separate file. Because of this, I want to
have the beginning of my .pm files start with the important Name, Usage,
etc. POD sections so they show up at the head of the documentation
before the little method descriptions. This seems natural to me,
anyway.
Unfortunately, the autogenerated pm_to_blib make target complains if I
don't have NAME as my first POD after the __END__ token. So if I want
to do things my way I've got to have the NAME show up at the end of my
docs, not the beginning.
So, my question: Is there any way in my Makefile.PM to direct
pm_to_blib to not be so stressed about the NAME coming right after
__END__? I don't mind going in and hacking if I have to, but I was
hoping that someone had already thought of this and devised a simple
solution.
- Ert / <just do the obvious thing to figure out my email address, eh?>
------------------------------
Date: Thu, 11 Mar 1999 21:10:26 GMT
From: jim-h@mailexcite.com
Subject: IO::SOCKET question: how can my server determine client's IP address?
Message-Id: <36e92f79.28283285@news.mindspring.com>
I've managed to get a simple client/server connection using
IO::Socket, but I want to add security that will allow only clients
with a certain IP address to connect to the server.
Where is the variable or method that holds the client's IP number:
This is the Perl code for the server:
#!/usr/local/bin/perl -w
use strict;
use IO::Socket;
use Socket;
my $server = IO::Socket::INET->new (
Listen => SOMAXCONN,
LocalAddr => 'localhost',
LocalPort => 2000,
Proto => 'tcp',
Reuse => 1, )
or die "Can not create socket: $!, stopped";
while (1)
{
my $client = $server->accept
or (warn "accept(): $!, ignoring", next);
$client->autoflush(1);
## Here's where I'd like to check the client's IP
$client->print ("Hello client, welcome!\n");
$client->close;
}
------------------------------
Date: Thu, 11 Mar 1999 21:21:33 GMT
From: kelby@mplx.com
Subject: Link validation
Message-Id: <7c9c4i$oc2$1@nnrp1.dejanews.com>
I need to find a way to check if a inputted link is a valid link. I want to
have a form and put in for example http://www.perl.com. I want the program
to try to call that link up and see if it is a valid web page. If so, it
needs to return true otherwise return false.
Thanks,
Kelby
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 11 Mar 1999 20:39:25 GMT
From: gward@cnri.reston.va.us (Greg Ward)
Subject: Re: Module to find duplicate files?
Message-Id: <7c99lt$6hc$3@ffx2nh5.news.uu.net>
Philip Newton <Philip.Newton@datenrevision.de> wrote:
> how would I go about finding duplicate files under a certain directory?
> Is there a module to do that already? A quick glance through CPAN didn't
> bring up anything which sounded as if it would work.
Here's a script that does this. It might take a few minutes to massage
it into a module; most importantly, it should be changed to use the
File::Compare module (standard with Perl 5.005) rather than exec'ing the
Unix-specific "cmp" utility. Left as an exercise for the reader.
#!/usr/local/bin/perl -w
#
# detect_duplicates
#
# looks for suspect duplicate files in a directory (by file size);
# checks that they're dupes by running 'cmp'; if so, optionally
# deletes all but one.
#
# GPW 1998/11/21
#
# $Id: detect_duplicates,v 1.1 1998/11/22 01:26:48 greg Exp $
#
use strict;
use Getopt::Std;
$0 =~ s|.*/||;
my %opt;
getopts ('d', \%opt);
my $delete_dupes = exists $opt{'d'};
# print "ok, I'll delete dupes\n" if $delete_dupes;
die "usage: $0 [-d] dir [pattern]\n" unless @ARGV;
my $dir = shift;
my $pattern = (shift or '.*');
opendir (DIR, $dir) || die "$0: couldn't open $dir: $!\n";
my @files = sort grep { -f "$dir/$_" and /$pattern/ } readdir (DIR);
die "$0: fewer than two files in $dir\n" unless @files >= 2;
my %size = map { $_ => -s $_ } @files;
@files = sort { $size{$a} <=> $size{$b} } @files;
my $prev_size = $size{$files[0]};
my @duplicates;
for my $i (1 .. $#files)
{
my ($cur_file, $prev_file) = @files[$i,$i-1];
if ($size{$cur_file} == $prev_size)
{
print "$prev_file and $cur_file have same size...";
my $differ;
{
if (! fork) # in the child
{
open (STDERR, ">/dev/null");
exec 'cmp', $cur_file, $prev_file;
die "$0: exec failed: $!\n";
}
else # in the parent
{
$differ = $?;
}
}
if (! $differ)
{
print " and are duplicates\n";
push (@duplicates, $cur_file);
}
else
{
print " but are not duplicates\n";
}
}
$prev_size = $size{$cur_file};
}
if ($delete_dupes and @duplicates)
{
print "deleting:\n";
foreach my $file (@duplicates)
{
print " $file\n";
unlink $file or warn "$0: unable to delete $file: $!\n";
}
}
--
Greg Ward - software developer gward@cnri.reston.va.us
Corporation for National Research Initiatives
1895 Preston White Drive voice: +1-703-620-8990 x287
Reston, Virginia, USA 20191-5434 fax: +1-703-620-0913
------------------------------
Date: Thu, 11 Mar 1999 13:59:56 -0800
From: Tobin Fricke <tobin@cory.eecs.berkeley.edu>
Subject: Re: Mysql question
Message-Id: <36E83CDC.CEC80323@cory.eecs.berkeley.edu>
> If i want to download/backup the database/tables i have
> created, how do i do that?
Use mysqldump.
> Does the tables/database created via a telnet session show up
> in my web site (i.e.can you see it using ftp)?
I think you're confused.. if you modify the database, the database is
modified regardless of how you subsequently access it.
Tobin
------------------------------
Date: 11 Mar 1999 14:13:28 -0700
From: Eric The Read <emschwar@mail.uccs.edu>
Subject: Re: Newbie Q about CGI-lib.pl
Message-Id: <xkfemmvk9vr.fsf@valdemar.col.hp.com>
David Van den Brande <brandeda@se.bel.alcatel.be> writes:
> I'm using CGI-lib to ReadParse my web form.
Use CGI.pm instead. It's much better.
> More precisely: I want to concatenate each key/value pair into a new
> variable and save them al into an array.
> for ex.: key1=>value1
> key2=>value2
> ...
> must be saved into an array as: Array[1]=key1.value1
> Array[2]=key2.value2
> ...
Why? What's wrong with keeping them in a hash? I'm not asking idly
here; the "key=>value" relation practically demands a hash. Using an
array is likely to only confuse people reading your code.
(a little re-ordering here)
> #!/usr/local/bin/perl5 -w
>
> use strict;
This is a Good Thing(tm). Do this a lot.
> My script returns the following (logical) error:
> Global symbol "hash" requires explicit package name
> Global symbol "key" requires explicit package name
> Global symbol "value" requires explicit package name
read "perldoc perldiags" when you don't understand an error message. I
quote:
Global symbol "%s" requires explicit package name
(F) You've said "use strict vars", which indicates that all
variables must either be lexically scoped (using "my"), or
explicitly qualified to say which package the global variable is
in (using "::").
-=Eric
------------------------------
Date: 11 Mar 1999 19:27:08 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: Objects: overriding a constructor
Message-Id: <7c95ec$2lf$1@towncrier.cc.monash.edu.au>
Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at> writes:
> package B;
> @ISA = qw(A); # B extends A
> sub new {
> my ($class, $a, $b) = @_;
> my $self = bless $class->SUPER::new($a), $class; # super(a)
my $self = $class->SUPER::new($a); # No need to rebless since A::new
# uses the two-argument bless.
> $self->{b} = $b;
> $self;
> }
Damian
------------------------------
Date: Thu, 11 Mar 1999 20:17:29 GMT
From: jorgearango@my-dejanews.com
Subject: OEM to ANSI in Perl?
Message-Id: <7c98cf$ks0$1@nnrp1.dejanews.com>
Is there any way to convert an OEM (DOS) text file to ANSI using ActiveState's
Perl on NT? Been racking my brain...
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 11 Mar 1999 20:20:22 GMT
From: jorge@imagenes.com
Subject: OEM to ANSI in Perl?
Message-Id: <7c98hs$l00$1@nnrp1.dejanews.com>
Is there a way to convert OEM (Dos) formatted text to ANSI? I'm using
ActiveState's port on NT.
Thanks,
Jorge
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 11 Mar 1999 21:07:36 +0200
From: "Michael Georgiadis" <mgeorgiadis@hotmail.com>
Subject: Re: Perl refuses to work in my browser, only in MSDos
Message-Id: <7c94c4$g6e$1@nnrp01.iafrica.com>
matthew
i'm having the same problem, but with windows nt 4.0 and apache web server.
i am not sure how to correct it, but i think it is a problem with the way
that the browser associates files with .pl or .cgi which is different to how
dos does it. perhaps we are missing some simple setting somewhere. hopefully
some guru will come along and put us out of our nightmare once and for all
best of luck
michael
Jay Glascoe wrote in message <36E6D03F.24B342FE@giss.nasa.gov>...
>[courtesy copy sent to cited author]
>
>Matthew Baines wrote:
>>
>> This is really getting me down.
>
>:o(
>
>> When I use Perl in Dos, it works fine. Any recommendations would be
greatly
>> appreciated.
>
>The script works off of the command line, right?
>Since the script itself seems to be working, I think
>this is a problem suitable for comp.infosystems.www.authoring.cgi
>(i.e., I have no idea how to help you ;^)
>
>Be sure to read their FAQ (don't don that red suit).
>http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=451974553
>
> Jay Glascoe
>--
>"The number of UNIX installations has grown to 10, with more expected."
> -- _The UNIX Programmer's Manual_, Second Edition, June, 1972.
------------------------------
Date: Thu, 11 Mar 1999 15:36:31 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: Scott Harvey <sbharvey@west.raytheon.com>
Subject: Re: perl to c compiler; where do you get it?
Message-Id: <36E8294F.1A76EBFB@giss.nasa.gov>
[courtesy copy of post sent to cited author]
Scott Harvey wrote:
>
> Does the perl to c compiler work on Linux. Any pitfalls? Is there
> another way to compile perl scripts to machine execuatable form?
see perlfaq3: "How can I compile my Perl program into byte code or C"
> Thanks
hth, Jay
--
"'C' is for 'Cookie', that's good enough for me."
--Cookie Monster
------------------------------
Date: Thu, 11 Mar 1999 15:18:52 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Scheduled Task
Message-Id: <comdog-ya02408000R1103991518520001@news.panix.com>
In article <36e80e81.166522727@207.227.203.4X>, bhoyle@huntersville.org posted:
> Can I set up a routine that will automatically go retreive this file
> (shortly after it is updated) each hour so the user script will just
> open it from the host server? Is there a process or loop that will run
> all the time?
man cron
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: Thu, 11 Mar 1999 15:16:41 -0600
From: Victor Acevedo <vacevedo@tyr.mty.itesm.mx>
Subject: Using Kermit
Message-Id: <36E832B8.9841E6B5@tyr.mty.itesm.mx>
Has anyone written any script useful for making a dial up
connection
with perl and C-Kermit, or has any idea of where can I find any good
"manual" online?
What I'm trying to do is specifically send a message to a pager ,
using the
TAP/IXO protocol with C-Kermit, and I'm planning to write it in
perl.
Thanks in advance .
------------------------------
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 5113
**************************************