[16299] in Perl-Users-Digest
Perl-Users Digest, Issue: 3711 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 18 09:37:50 2000
Date: Tue, 18 Jul 2000 06:37:40 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <963927460-v9-i3711@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 18 Jul 2000 Volume: 9 Number: 3711
Today's topics:
Could someone clone MS's IL for another OS? (Randall Parker)
Re: Could someone clone MS's IL for another OS? (Neil Hodgson)
cpan patch to use wget (Michael Dean)
Re: cpan patch to use wget (Jonathan Stowe)
date in YYYYMMDDHH24MISS format ()
Re: date in YYYYMMDDHH24MISS format (Tony Curtis)
Re: date in YYYYMMDDHH24MISS format (Lauren Smith)
Re: date in YYYYMMDDHH24MISS format (Craig Berry)
DBI object version 1.13 does not match (terri143)
Re: DBI/Oracle/bind_param/boolean (Ron Reidy)
Re: Delayed HTML Output in PERL ()
Did I FLOCK this correctly? (BUCK NAKED1)
Re: Did I FLOCK this correctly? (Eric Bohlman)
Re: Did I FLOCK this correctly? (Larry Rosler)
Difference between a .cgi file and a .pl file? (DS)
Re: Difference between a .cgi file and a .pl file? ()
Re: Difference between a .cgi file and a .pl file? (Bart Lateur)
Re: Difference between a .cgi file and a .pl file? (Hero)
Re: Difference between a .cgi file and a .pl file? (Jürgen Exner)
Re: Difference between a .cgi file and a .pl file? (Alon Rachamim)
Re: Difference between a .cgi file and a .pl file? (Abigail)
Re: Difference between a .cgi file and a .pl file? (Peter Sundstrom)
Re: Difference between a .cgi file and a .pl file? (Villy Kruse)
difference between running perl from command line and w (Shao Zhang)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 18 Jul 2000 01:10:01 GMT
From: rgparker@west.net.bbs@openbazaar.net (Randall Parker)
Subject: Could someone clone MS's IL for another OS?
Message-Id: <3bRVdQ$VXi@openbazaar.net>
Could someone write a clone of MS's new intermediate compiler language to
native code compiler in order to write Perl, Python, or Eiffel on
Windows, compile it to IL, and then eventually native code compile it on
some other OS platform?
Does anyone think such a capability is a good idea?
Does anyone think that someone will do this?
------------------------------
Date: 18 Jul 2000 01:30:03 GMT
From: neilh@scintilla.org.bbs@openbazaar.net (Neil Hodgson)
Subject: Re: Could someone clone MS's IL for another OS?
Message-Id: <3bRWGR$Wzx@openbazaar.net>
> Could someone write a clone of MS's new intermediate compiler language to
> native code compiler in order to write Perl, Python, or Eiffel on
> Windows, compile it to IL, and then eventually native code compile it on
> some other OS platform?
I think its likely Microsoft will publish enough documentation to make it
possible to write an IL VM for other systems. Microsoft may even make an IL
VM available for other systems with the most likely being MacOS. If this is
going to happen, I'd expect it to be announced at MacWorld this week.
The question here is to what extent Microsoft wants to beat Java/Sun.
Widespread availability of IL VMs would help this goal, while still allowing
differentiation of the preferred platforms on the basis of which libraries
are available. Microsoft will also have a large lead in designing IL VMs so
will be able to ensure best perfromance is on those preferred platforms.
They can also win on effort applied - when competing with their Java VM
Microsoft achieved very good benchmarks.
> Does anyone think such a capability is a good idea?
> Does anyone think that someone will do this?
Yes to both.
Neil
------------------------------
Date: 17 Jul 2000 04:30:02 GMT
From: sysmwd@blackhole.detir.qld.gov.au.bbs@openbazaar.net (Michael Dean)
Subject: cpan patch to use wget
Message-Id: <3bQlPQ$V41@openbazaar.net>
Hellow there
I'm not sure of the procedure for getting changes put into CPAN,
but I'm always patching CPAN to use wget, so here are the changes
I make ... have fun cut'n'pasting, remember to set .
claire3:/home/src-mwd 1723 # diff -c CPAN-1.54/lib/CPAN.pm CPAN-1.54-mwd/lib/CPAN.pm
*** CPAN-1.54/lib/CPAN.pm Sun Mar 26 08:30:17 2000
--- CPAN-1.54-mwd/lib/CPAN.pm Tue Jul 4 13:00:51 2000
***************
*** 2229,2235 ****
$self->debug("localizing funkyftpwise[$url]") if $CPAN::DEBUG;
my($f,$funkyftp);
! for $f ('lynx','ncftpget','ncftp') {
next unless exists $CPAN::Config->{$f};
$funkyftp = $CPAN::Config->{$f};
next unless defined $funkyftp;
--- 2229,2235 ----
$self->debug("localizing funkyftpwise[$url]") if $CPAN::DEBUG;
my($f,$funkyftp);
! for $f ('wget','lynx','ncftpget','ncftp') {
next unless exists $CPAN::Config->{$f};
$funkyftp = $CPAN::Config->{$f};
next unless defined $funkyftp;
***************
*** 2240,2245 ****
--- 2240,2247 ----
my($source_switch) = "";
if ($f eq "lynx"){
$source_switch = " -source";
+ } elsif ($f eq "wget"){
+ $source_switch = " -O -";
} elsif ($f eq "ncftp"){
$source_switch = " -c";
}
claire3:/home/src-mwd 1726 # diff -c CPAN-1.54/lib/CPAN/FirstTime.pm CPAN-1.54-mwd/lib/CPAN/FirstTime.pm
*** CPAN-1.54/lib/CPAN/FirstTime.pm Fri Mar 24 09:27:23 2000
--- CPAN-1.54-mwd/lib/CPAN/FirstTime.pm Tue Jul 4 13:04:07 2000
***************
*** 214,220 ****
my(@path) = split /$Config{'path_sep'}/, $ENV{'PATH'};
local $^W = $old_warn;
my $progname;
! for $progname (qw/gzip tar unzip make lynx ncftpget ncftp ftp/){
if ($^O eq 'MacOS') {
$CPAN::Config->{$progname} = 'not_here';
next;
--- 214,220 ----
my(@path) = split /$Config{'path_sep'}/, $ENV{'PATH'};
local $^W = $old_warn;
my $progname;
! for $progname (qw/gzip tar unzip make lynx wget ncftpget ncftp ftp/){
if ($^O eq 'MacOS') {
$CPAN::Config->{$progname} = 'not_here';
next;
If anyone cares to add this to CPAN plz do so, (or point me in the
right direction?)
regards
mike
:)
--
--
------------------------------
Date: 18 Jul 2000 08:00:12 GMT
From: gellyfish@gellyfish.com.bbs@openbazaar.net (Jonathan Stowe)
Subject: Re: cpan patch to use wget
Message-Id: <3bRgOE$UyN@openbazaar.net>
On Mon, 17 Jul 2000 04:36:25 GMT Michael Dean wrote:
>
> Hellow there
>
> I'm not sure of the procedure for getting changes put into CPAN,
> but I'm always patching CPAN to use wget, so here are the changes
> I make ... have fun cut'n'pasting, remember to set .
>
The CPAN module is maintained by Perl5-Porters - you could submit the
patch there directly, via perlbug or to the author as listed in the
manpage. Anyhow cheers for that - I had been thinking about that a
little while ago.
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: 17 Jul 2000 18:10:02 GMT
From: rrubin@rotor.net.bbs@openbazaar.net ()
Subject: date in YYYYMMDDHH24MISS format
Message-Id: <3bRKgQ$Xfg@openbazaar.net>
Hello,
I need to format a date in the following format
YYYYMMDDHH24MISS
Any help would be appreciated.
RR
rrubin@rotor.net
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 17 Jul 2000 18:30:07 GMT
From: tony_curtis32@yahoo.com.bbs@openbazaar.net (Tony Curtis)
Subject: Re: date in YYYYMMDDHH24MISS format
Message-Id: <3bRLJX$V8I@openbazaar.net>
>> On Mon, 17 Jul 2000 18:03:28 GMT,
>> rrubin@rotor.net said:
> Hello, I need to format a date in the following format
> YYYYMMDDHH24MISS
perldoc POSIX
strftime
use POSIX qw(strftime);
my $date = strftime('%Y%m%d%H24%M%S', localtime);
(I presume the "24" is meant to be a literal? %I instead
of %H does the 12/24 hour clock shift)
hth
t
--
"With $10,000, we'd be millionaires!"
Homer Simpson
------------------------------
Date: 17 Jul 2000 18:40:03 GMT
From: lauren_smith13@hotmail.com.bbs@openbazaar.net (Lauren Smith)
Subject: Re: date in YYYYMMDDHH24MISS format
Message-Id: <3bRLW2$VOI@openbazaar.net>
<rrubin@rotor.net> wrote in message news:8kvhp2$3n2$1@nnrp1.deja.com...
> Hello,
>
> I need to format a date in the following format
>
>
> YYYYMMDDHH24MISS
Check out the sprintf() function.
perldoc -f sprintf
Lauren
------------------------------
Date: 18 Jul 2000 01:20:03 GMT
From: cberry@cinenet.net.bbs@openbazaar.net (Craig Berry)
Subject: Re: date in YYYYMMDDHH24MISS format
Message-Id: <3bRW43$TTZ@openbazaar.net>
rrubin@rotor.net wrote:
: I need to format a date in the following format
: YYYYMMDDHH24MISS
perldoc POSIX
see the strftime() function.
--
| Craig Berry - http://www.cinenet.net/users/cberry/home.html
--*-- "Beauty and strength, leaping laughter and delicious
| languor, force and fire, are of us." - Liber AL II:20
------------------------------
Date: 17 Jul 2000 10:50:02 GMT
From: terri143@email.msn.com.bbs@openbazaar.net (terri143)
Subject: DBI object version 1.13 does not match
Message-Id: <3bR9KR$W4J@openbazaar.net>
Hi,
I have installed MySql on my server
MySQL-3.23.10-1
MySQL-bench-3.23.10-1
MySQL-client-3.23.10-1
MySQL-devel-3.23.10-1
and perl modules:
Data-Dumper-2.101
Data-ShowTable-3.3
DBI-1.13
Msql-Mysql-modules-1.2018
mysql-DBI-perl-bin
DBI-perl-bin
When I try to run my perl script that I have ran on another server I get
this error message:
install_driver(mysql) failed: [Mon Jul 17 07:45:57 2000] index.cgi: Can't
locate DBD/mysql.pm
in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux
/usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .)
I added the directory that DBD was installed in to @INC using this code:
BEGIN {
unshift @INC, "/usr/lib/perl5/site_perl";
}
I get this error:
[Mon Jul 17 07:49:47 2000] index.cgi: DBI object version
1.13 does not match $DBI::VERSION 0.93 at
/usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line
188.
I opened DynaLoader.pm and went to line 188 and found this:
# Many dynamic extension loading problems will appear to come from
# this section of code: XYZ failed at line 123 of DynaLoader.pm.
# Often these errors are actually occurring in the initialisation
# C code of the extension XS file. Perl reports the error as being
# in this perl code simply because this was the last perl code
# it executed.
I have searched deja news, read docs, tried to reinstall MySql and the perl
modules. I have tried everything I can think of and nothing works. I am
going on day five with this problem.
Anyone have any idea of what I may be doing wrong or what the "XS file" is?
Maybe someone has seen this before?
Thanks for ANY help as I am about to loose "it" over this problem.
------------------------------
Date: 18 Jul 2000 04:30:03 GMT
From: rereidy@indra.com.bbs@openbazaar.net (Ron Reidy)
Subject: Re: DBI/Oracle/bind_param/boolean
Message-Id: <3bRb1U$Vzl@openbazaar.net>
grfalk@my-deja.com wrote:
>
> Help!
>
> Using DBI and DBD::Oracle, how do you use the
> bind_param_inout method to associate a local Perl
> variable to a BOOLEAN type parameter in a stored
> procedure call, or to a stored function's return
> value that is of type BOOLEAN? There appears to
> be no DBD variable type associated with the
> Oracle BOOLEAN variable type. No matter what DBI
> variable type I use in the bind_param_inout
> method call, I always receive the following error
> upon execution of the SQL statement: "PLS-00306:
> wrong number or types of arguments in call
> to '<stored procedure/function name>'". If I
> change the BOOLEAN variable in the stored
> procedure to VARCHAR2 or NUMBER, everything works
> fine.
>
> Is this possible to do? I find it hard to believe
> that it's not. Thank you in advance for your
> responses!
>
> Gary
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Gary,
A boolean type is a PL/SQL type. Perl does not have a data type that is
equivalent. You will need to wrap your SP call around an anonomous
PL/SQL block and interprit/convert the boolean return value into a
datatype Perl can use (i.e. integer).
Good luck.
--
Ron Reidy
Oracle DBA
Reidy Consulting, L.L.C.
------------------------------
Date: 13 Jul 2000 18:20:02 GMT
From: richardstands@my-deja.com.bbs@openbazaar.net ()
Subject: Re: Delayed HTML Output in PERL
Message-Id: <3bOF71$V8A@openbazaar.net>
In article <39614564.8A25B068@bookmarc.com>,
marc@bookmarc.com wrote:
>
> I have a PERL program that I wrote which is slow to output a html
data
> file to the screen. I would like to print a warning that it may take
> time so the user does not give up on the output and surf the web
> elsewhere.. However, The html page does not print until it has the
> entire output in the buffer. So the user does not see the gentle
> warning that he/she may have to wait a couple of minutes before the
> output is delivered to his browser.
>
> Does anyone have a straight forward trick to printing out part of a
page
> to an html browser before the entire output is ready to be printed?
I have the same problem as you have/did.
If you have the pleasure of running your script on an O/S that supports
Perl's fork() function then this should be easy( there is at least one
reply post that has a link to such a script ). As Microsoft's Internet
Explorer does not support server push I don't suggest that as an
option.
If, however, you are running the script under Windows then it is a
different issue. For this O/S I had to use the Perl system() function
to call the Windows "start" command to start another script process
that could create the file that the first call could "refresh" as it
was being created. I could *not* get this to work with Apache server
but, thankfully, was able to get it to work using Microsoft's IIS. Here
is my code FWIW:
#!perl -w
use strict;
use CGI qw(:standard);
import_names;
my $dat = 'foo.dat';
my $html = "temp.html";
my $script = 'spawn.pl';
my $temp = "temp.dat";
unlink( $temp ) if ( -e $temp );
if ( ( $#ARGV + 1 ) <= 0 ) { # works from both CGI and command line
# create the inital html doc
open( H, ">c:\\inetpub\\wwwroot\\$html" ) or die( $! );
print( H start_html );
print( H "<META HTTP-EQUIV='refresh' CONTENT=\"5;
URL=http://mydomain.com/temp.html\">" );
print( H hr );
print( H "No data yet...<BR>\n" );
print( H hr );
print( H end_html );
close( H );
# try spawning
system( "start /MIN perl.exe $script foo" ) == 0 || die( "spawn
failed" );
print redirect( "http://mydomain.com/$html" );
} else {
make_output();
}
exit( 1 );
########################################################################
####
sub make_output #07/13/00 11:59:AM
########################################################################
####
{
open( D, "<$dat" ) or die( $! );
while( <D> ) {
# add the next line to the temp file
open( T, ">>$temp" ) or die( $! );
print( T );
close( T );
# recreate the entire doc for each line(conflicts?)
open( H, ">c:\\inetpub\\wwwroot\\$html" ) or die( $! );
print( H start_html );
print( H "<META HTTP-EQUIV='refresh' CONTENT=\"5;
URL=http://mydomain.com/$html\">" );
print( H hr );
# dump contents of temp file
open( T, "<$temp" ) or die( $! );
while( <T> ) {
print( H "$_<BR>\n" );
}
close( T );
# finish doc
print( H hr );
print( H end_html );
close( H );
sleep( 1 );
}
close( D );
} ##make_output
-Rich
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 17 Jul 2000 07:10:03 GMT
From: dennis100@webtv.net.bbs@openbazaar.net (BUCK NAKED1)
Subject: Did I FLOCK this correctly?
Message-Id: <3bR3XR$Uzd@openbazaar.net>
or is there a better way to flock it? I wrote the following code below
for a counter. Lame, I know, and I know how many of you loathe counters,
so spare me your feelings on that, if you don't mind.
The code is unique though. I wrote it so that it not only adds commas,
but adds a rd, nd, st, or th as needed, such as 31st, 1,022nd, etc. Feel
free to point out any errors/improvements. Thanks. Your response will be
greatly appreciated.
Kind Regards --DENNIS
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
open HITS, "pagehits3.dat";
#The line below LOCKS the file
flock HITS, 2;
$hits = <HITS>;
++$hits;
open(HITS,">pagehits3.dat");
print HITS $hits;
1 while $hits =~ s/(.*\d)(\d\d\d)/$1,$2/;
1 while $hits =~ s/(11$|12$|13$)/$1th/;
1 while $hits =~ s/(1$)/$1st/;
1 while $hits =~ s/(2$)/$1nd/;
1 while $hits =~ s/(3$)/$1rd/;
1 while $hits =~ s/(4$|5$|6$|7$|8$|9$|0$)/$1th/;
# The line below locks the file for 2 seconds
sleep 2;
# The following 2 lines UNLOCK the file
flock HITS, 8;
close HITS;
print <<HTML;
<DIV align='center'><font size='2' color='#66000'>You are the $hits
person to visit this website. Thanks for dropping by.</font>\n</DIV>
HTML
##END OF SCRIPT
------------------------------
Date: 17 Jul 2000 10:10:02 GMT
From: ebohlman@netcom.com.bbs@openbazaar.net (Eric Bohlman)
Subject: Re: Did I FLOCK this correctly?
Message-Id: <3bR8IQ$Xbf@openbazaar.net>
BUCK NAKED1 (dennis100@webtv.net) wrote:
: #!/usr/local/bin/perl
Missing -w
Missing 'use strict;'
: print "Content-type: text/html\n\n";
: open HITS, "pagehits3.dat";
No checking if open was successful
Use of relative path in CGI program without chdir()ing to a known location
: #The line below LOCKS the file
: flock HITS, 2;
Use of magic number rather than defined constant
: $hits = <HITS>;
: ++$hits;
: open(HITS,">pagehits3.dat");
Failure to check, relative path, automatically closes file and releases
lock. After this statement your file is empty and unlocked; if another
copy of your program executes at this point, it will read an undefined
value into $hits, which will get treated as zero in the increment, which
will cause your counter to reset to 1.
: print HITS $hits;
: 1 while $hits =~ s/(.*\d)(\d\d\d)/$1,$2/;
: 1 while $hits =~ s/(11$|12$|13$)/$1th/;
: 1 while $hits =~ s/(1$)/$1st/;
: 1 while $hits =~ s/(2$)/$1nd/;
: 1 while $hits =~ s/(3$)/$1rd/;
: 1 while $hits =~ s/(4$|5$|6$|7$|8$|9$|0$)/$1th/;
: # The line below locks the file for 2 seconds
: sleep 2;
No it doesn't
: # The following 2 lines UNLOCK the file
: flock HITS, 8;
You don't want to explicitly unlock a file before closing it.
: close HITS;
: print <<HTML;
: <DIV align='center'><font size='2' color='#66000'>You are the $hits
: person to visit this website. Thanks for dropping by.</font>\n</DIV>
: HTML
Generating invalid HTML (no <title> element).
I suggest you read the sections about file locking in the FAQ.
------------------------------
Date: 17 Jul 2000 19:50:04 GMT
From: lr@hpl.hp.com.bbs@openbazaar.net (Larry Rosler)
Subject: Re: Did I FLOCK this correctly?
Message-Id: <3bRNNT$Wzz@openbazaar.net>
In article <4423-3972B096-138@storefull-244.iap.bryant.webtv.net> on
Mon, 17 Jul 2000 02:07:02 -0500 (CDT), BUCK NAKED1 <dennis100@webtv.net>
says...
...
> 1 while $hits =~ s/(.*\d)(\d\d\d)/$1,$2/;
> 1 while $hits =~ s/(11$|12$|13$)/$1th/;
> 1 while $hits =~ s/(1$)/$1st/;
> 1 while $hits =~ s/(2$)/$1nd/;
> 1 while $hits =~ s/(3$)/$1rd/;
> 1 while $hits =~ s/(4$|5$|6$|7$|8$|9$|0$)/$1th/;
Though you didn't ask about this part, a comment must be made. You are
programming here by cargo-culting yourself. Your first regex commifies
the number, which requires a loop. But the others just test and append
to the end of the number, of which there is only one such. So the loops
are just silly.
Just for neatness, you could combine a couple of them, and factor out
the end-of-string anchor:
$hits =~ s/(1[123]|[4-90])$/$1th/;
I' sure that there is an ordinalizing module in CPAN, but the code you
have is quite workable.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 16 Jul 2000 17:30:03 GMT
From: snakeman@kc.rr.com.bbs@openbazaar.net (DS)
Subject: Difference between a .cgi file and a .pl file?
Message-Id: <3bQUGR$WGO@openbazaar.net>
What is the diference betweeen a .pl file and a .cgi file?
Can I convert a .pl to a .cgi?
Thanks
Dirk
------------------------------
Date: 16 Jul 2000 18:10:05 GMT
From: fvision@my-deja.com.bbs@openbazaar.net ()
Subject: Re: Difference between a .cgi file and a .pl file?
Message-Id: <3bQVIT$Xfg@openbazaar.net>
Dirk,
The difference between a .cgi and .pl file is really not the issue you
are probably facing. .cgi and .pl are simply file extensions that tell
your web server how to deal with that particular file. On almost all web
servers there is a "cgi-bin" directory. The web server treats all files
in this directory as executables. Web servers can also be configured to
recognize files as executables even when they are not in the "cgi-bin"
directory. When this option is turned on the default for the server is
to treat files ending in .cgi as executables. This however can be
extended to include .pl or .exe or .bucky for all the server cares. It
just wants to know what to try to execute. Making that file executable
is up to you. And yes you can simply change the name of a file from
something.pl to somthing.cgi. This will only cause problems if the
executable itself or other resources expect to find it named something.pl
In article <vjmc5.94$L5.2310@typhoon.kc.rr.com>,
"DS" <snakeman@kc.rr.com> wrote:
> What is the diference betweeen a .pl file and a .cgi file?
> Can I convert a .pl to a .cgi?
>
> Thanks
> Dirk
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 16 Jul 2000 19:40:11 GMT
From: bart.lateur@skynet.be.bbs@openbazaar.net (Bart Lateur)
Subject: Re: Difference between a .cgi file and a .pl file?
Message-Id: <3bQXZB$W0K@openbazaar.net>
DS wrote:
>What is the diference betweeen a .pl file and a .cgi file?
>Can I convert a .pl to a .cgi?
If in Perl, both are the same. It depends on the servcer configuration
whether they are truely interchangable.
But a CGI script can be written in one of many languages. So a .cgi file
needn't actually have been written in Perl.
--
Bart.
------------------------------
Date: 16 Jul 2000 23:20:01 GMT
From: ispitup@hotmail.com.bbs@openbazaar.net (Hero)
Subject: Re: Difference between a .cgi file and a .pl file?
Message-Id: <3bQdM2$V43@openbazaar.net>
No difference, it only maters whether your server is set up to recognize
the extensions...then you decide the extension, so to convert the file,
just change the extension...
DS wrote:
> What is the diference betweeen a .pl file and a .cgi file?
> Can I convert a .pl to a .cgi?
>
> Thanks
> Dirk
------------------------------
Date: 17 Jul 2000 16:10:02 GMT
From: juex@deja.com.bbs@openbazaar.net (Jürgen Exner)
Subject: Re: Difference between a .cgi file and a .pl file?
Message-Id: <3bRHaR$XDX@openbazaar.net>
"DS" <snakeman@kc.rr.com> wrote in message
news:vjmc5.94$L5.2310@typhoon.kc.rr.com...
> What is the diference betweeen a .pl file and a .cgi file?
The file extension?
> Can I convert a .pl to a .cgi?
'mv foobar.pl foobar.cgi' should do the job.
But maybe you wanted to ask what is the difference between a Perl file and a
CGI file?
Let's just say they have little in common. Many, many Perl programs are used
without any relation to CGI and CGI files can be programmed in any language,
Perl just being one among many.
jue
------------------------------
Date: 17 Jul 2000 19:50:04 GMT
From: alonio@isdn.net.il.bbs@openbazaar.net (Alon Rachamim)
Subject: Re: Difference between a .cgi file and a .pl file?
Message-Id: <3bRNNV$X5_@openbazaar.net>
I think and for what I tested no difrence only .cgi can be for other script
language and .pl is for Perl only
DS <snakeman@kc.rr.com> wrote in message
news:vjmc5.94$L5.2310@typhoon.kc.rr.com...
> What is the diference betweeen a .pl file and a .cgi file?
> Can I convert a .pl to a .cgi?
>
>
> Thanks
> Dirk
>
>
------------------------------
Date: 17 Jul 2000 20:20:06 GMT
From: abigail@delanet.com.bbs@openbazaar.net (Abigail)
Subject: Re: Difference between a .cgi file and a .pl file?
Message-Id: <3bROD5$X5p@openbazaar.net>
DS (snakeman@kc.rr.com) wrote on MMDXI September MCMXCIII in
<URL:news:vjmc5.94$L5.2310@typhoon.kc.rr.com>:
][ What is the diference betweeen a .pl file and a .cgi file?
The name.
][ Can I convert a .pl to a .cgi?
Sure. Rename the file.
Abigail
--
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
${qq$\x5F$} = q 97265646f9 and s g..g;
qq e\x63\x68\x72\x20\x30\x78$&eggee;
{eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'
------------------------------
Date: 18 Jul 2000 05:00:03 GMT
From: peter.sundstrom@eds.com.bbs@openbazaar.net (Peter Sundstrom)
Subject: Re: Difference between a .cgi file and a .pl file?
Message-Id: <3bRbd3$VSD@openbazaar.net>
Alon Rachamim wrote in message <3973653c@news.bezeqint.net>...
> I think and for what I tested no difrence only .cgi can be for other
script
> language and .pl is for Perl only
I can call my Perl script foo.fred or foo.java or foo.c and it will still be
a Perl script.
------------------------------
Date: 18 Jul 2000 08:40:09 GMT
From: vek@pharmnl.ohout.pharmapartners.nl.bbs@openbazaar.net (Villy Kruse)
Subject: Re: Difference between a .cgi file and a .pl file?
Message-Id: <3bRhQ9$V1m@openbazaar.net>
On 17 Jul 2000 10:16:23 EDT, Abigail <abigail@delanet.com> wrote:
>DS (snakeman@kc.rr.com) wrote on MMDXI September MCMXCIII in
><URL:news:vjmc5.94$L5.2310@typhoon.kc.rr.com>:
>][ What is the diference betweeen a .pl file and a .cgi file?
>
>The name.
>
>][ Can I convert a .pl to a .cgi?
>
>Sure. Rename the file.
>
>
>
Correct.
In some systems the extensions are magic, so a perl script is recognized
as such only based on the suffix.
On unix systems in general the suffix on executables is not used for any
purpuse; the '#!' line does that. And if you install CGI programs in
a dedicated cig-bin directory, the web server doesn't care either.
Villy
------------------------------
Date: 18 Jul 2000 04:30:03 GMT
From: shao@linux.cia.com.au.bbs@openbazaar.net (Shao Zhang)
Subject: difference between running perl from command line and web
Message-Id: <3bRb1R$Vne@openbazaar.net>
Hi,
I am having some strange problems with perl.
For example:
$output = `echo name=value | lynx -post_data -dump
"www.blah.com/cgi-bin/blah.cgi"`;
Now, with earlier perl versions, this works from both command line and
web(as an cgi program). However, recently, I upgraded to perl5.005 and
now it only works from command line and not web anymore.
Any ideas?
Shao.
--
____________________________________________________________________________
Shao Zhang - Running Debian 2.1 ___ _ _____
Department of Communications / __| |_ __ _ ___ |_ / |_ __ _ _ _ __ _
University of New South Wales \__ \ ' \/ _` / _ \ / /| ' \/ _` | ' \/ _` |
Sydney, Australia |___/_||_\__,_\___/ /___|_||_\__,_|_||_\__, |
Email: shao@cia.com.au |___/
_____________________________________________________________________________
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 3711
**************************************