[15633] in Perl-Users-Digest
Perl-Users Digest, Issue: 3046 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 15 03:05:33 2000
Date: Mon, 15 May 2000 00:05:09 -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: <958374308-v9-i3046@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 15 May 2000 Volume: 9 Number: 3046
Today's topics:
[Perl] about file <raymondchanth@my-deja.com>
Re: [Perl] about file <jeff@vpservices.com>
Re: Access from several Perl-Scripts on one variable? <aqumsieh@hyperchip.com>
Re: Defining charset in cgi script <phill@modulus.com.au>
Re: Directory Help in perl <uri@sysarch.com>
Displaying more than one match (using XBase) <iandi@gate.net>
Re: Displaying more than one match (using XBase) <jeff@vpservices.com>
DLL <bosch@ippa.lu>
Re: Forms with Perl (David Efflandt)
Re: Help! Can't find Perl work! <aran@mapcruzin.com>
Re: How to replace "\" , HELP! <workshop@modnet.com.au>
Re: How to replace "\" , HELP! <phill@modulus.com.au>
Re: Number of things in an array? (David H. Adler)
PERL on CDROM <samstone@hollywoodmonsters.cc>
Re: Programing Question...) <zigouras@mail.med.upenn.edu>
Programing Question... <chillin@mauigateway.com>
Re: Programing Question... <spong@baked.net>
Re: Programmer Required (David H. Adler)
Re: tar in Perl, system or not <xah@xahlee.org>
Re: tar in Perl, system or not <anmcguire@ce.mediaone.net>
Re: tar in Perl, system or not <aperrin@davis.DEMOG.Berkeley.EDU>
text counter <jtjohnston@courrier.usherb.ca>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 15 May 2000 03:56:00 GMT
From: Raymond <raymondchanth@my-deja.com>
Subject: [Perl] about file
Message-Id: <8fnsgc$ge$1@nnrp1.deja.com>
file: a.txt
INSERT INTO a VALUES (9, '0000-00-00 00:00:00')
INSERT INTO a VALUES (10, '0000-00-00 00:00:00')
INSERT INTO a VALUES (200,'0000-00-00 00:00:00')
INSERT INTO a VALUES (450,'0000-00-00 00:00:00')
...
...
file: b.txt
INSERT INTO b VALUES (10, '2000-05-13 16:07:23')
INSERT INTO b VALUES (450, '2000-05-14 13:42:28')
INSERT INTO b VALUES (5000,'2000-05-15 11:06:53')
...
...
output: c.txt
INSERT INTO a VALUES (9, '0000-00-00 00:00:00')
INSERT INTO a VALUES (10, '2000-05-13 16:07:23')
INSERT INTO a VALUES (200,'0000-00-00 00:00:00')
INSERT INTO a VALUES (450,'2000-05-14 13:42:28')
...
...
I want to read the values 9,10,200,450... in a.txt
and then compare the values 10,450,5000... in b.txt.
If the same value is matched in b.txt, the datetime values
"0000-00-00 00:00:00" will be overwritten by the corresponding
datetime value in b.txt. Otherwise, use the existing values.
As a result, the output c.txt will be obtained.
How to implement it using Perl ? Thank you very much.
Raymond
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sun, 14 May 2000 21:41:45 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: [Perl] about file
Message-Id: <391F8009.A7D9D8B1@vpservices.com>
Raymond wrote:
>
> file: a.txt
> INSERT INTO a VALUES (9, '0000-00-00 00:00:00')
> INSERT INTO a VALUES (10, '0000-00-00 00:00:00')
> INSERT INTO a VALUES (200,'0000-00-00 00:00:00')
> INSERT INTO a VALUES (450,'0000-00-00 00:00:00')
> ...
> ...
>
> file: b.txt
> INSERT INTO b VALUES (10, '2000-05-13 16:07:23')
> INSERT INTO b VALUES (450, '2000-05-14 13:42:28')
> INSERT INTO b VALUES (5000,'2000-05-15 11:06:53')
> ...
> ...
>
> output: c.txt
> INSERT INTO a VALUES (9, '0000-00-00 00:00:00')
> INSERT INTO a VALUES (10, '2000-05-13 16:07:23')
> INSERT INTO a VALUES (200,'0000-00-00 00:00:00')
> INSERT INTO a VALUES (450,'2000-05-14 13:42:28')
There are several ways you can accomplish this in Perl. Since you seem
to be using SQL there, you may want to try it with DBI the Perl way to
use SQL. If you are talking about actual text files, then use DBD::CSV
or DBD::RAM. If you are talking about some other kind of database, use
the DBD for that database. More info at:
http://www.symbolstone.org/technology/perl/DBI/
--
Jeff
------------------------------
Date: Mon, 15 May 2000 04:06:28 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Access from several Perl-Scripts on one variable?
Message-Id: <7apuqo78zd.fsf@Merlin.i-did-not-set--mail-host-address--so-shoot-me>
"Thorsten" <thorsten_kuske@gmx.net> writes:
> Is it possible to access from several Perl-Scripts on one variable?
Well, it depends on what you mean by "one variable" and where you get
the value of the variable from. Perhaps you can place it in some file
that is accessible to the other Perl scripts. Or maybe you can use Inter
Process Communication (IPC) to communicate between your scripts (using
sockets, shared memory, etc ... depending on your OS).
Have a look at 'perlipc' to be enlightened further.
--Ala
------------------------------
Date: Mon, 15 May 2000 15:31:38 +1000
From: Peter Hill <phill@modulus.com.au>
Subject: Re: Defining charset in cgi script
Message-Id: <391F8BBA.45F4@modulus.com.au>
Jimmy E. wrote:
>
> Thanks!
> Do I put this line only once in the begining of the script file, or every
> time before text?
>
> > print "Content-type: text/html; charset=windows-1253\n\n";
> >
> > Should do the trick.
Once only prior to outputting via print your HTML.
--
Peter Hill,
Modulus Pty. Ltd.,
http://www.modulus.com.au/
------------------------------
Date: Mon, 15 May 2000 04:12:52 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Directory Help in perl
Message-Id: <x7em74sb7h.fsf@home.sysarch.com>
>>>>> "JLC" == Julian L Cardarelli <jc@juliancardarelli.com> writes:
JLC> opendir DIR, "$dir";
why aren't you checking the result of that? and why did you quote $dir?
it is fine and correct to pass it naked.
JLC> map { push @files, $_ if (-f "$dir/$_") } readdir(DIR);
warning! warning! use of map in a void context. and a useless use as
well. what you have there is a perfect need for grep.
@file = grep -f "$dir/$_", readdir( DIR ) ;
and to whomever first used it in this thread, comp.lang.perl is a very
dead group. tell your isp/news feed to stop carrying it.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Mon, 15 May 2000 00:19:10 -0400
From: "Ariel" <iandi@gate.net>
Subject: Displaying more than one match (using XBase)
Message-Id: <8fnu4l$1up2$1@news.gate.net>
How can I get the following script to display more than one match? It works
fine to display an exact match, such as cust_id=105 (one customer id).
However, I would like it to display all of the matches, such as cust_id=10
(customer id`s 101 through 109).
I have tried using "for ( $i=1; $i<=10; $i++ )" in different places. If it
is an exact match, it displayes the matched record 10 times. If there is
more than one match, it displays the first matched record 10 times. The
following is the script, however, I took out the "for ( $i=1; $i<=10;
$i++ )" statement to avoid confussion. The script, as is, works fine, but
only displays the first record matched.
****
#!/usr/bin/perl
# brokers.pl
use Xbase;
use Fcntl;
use CGI;
$form = new CGI;
print_header( $form->param("cust_id") );
$httppath=""; # must not end with a `/`
$sitepath=$ENV{"DOCUMENT_ROOT"} . "/";
$CGIPath=$sitepath . "../cgi-bin/";
$datadir=$CGIPath;
# database file name
$dbfile = "brokers.dbf";
$indexfile = "cust_id.idx";
if (chdir($sitepath) == 0)
{
print "<br><strong>error $!: can`t cd to $sitepath</strong><br><br>\n";
}
if (chdir($datadir) == 0)
{
print "<br><strong>error $!: can`t cd to $datadir</strong><br><br>\n";
}
# open datafile
$dbfh = new Xbase;
if ( $dbfh->open_dbf($dbfile,$indexfile) == 0 )
{
print "<br><STRONG>error $!: can`t open data file</STRONG><br><br>\n";
}
print "<p>\n";
print "<hr>\n";
$key = ($form->param("cust_id") );
if ( $dbfh->seek_dbf($key) == 0 )
{
print "<br><STRONG>error: record not found</STRONG><br><br>\n";
}
else
{
$dbfh->goto_record($dbfh->{`RECNO`});
$company = $dbfh->get_field("COMPANY");
$company =~ s/\s+( +)$//;
$company = $company . (" " x (44-length($company)));
$address1 = $dbfh->get_field("ADDRESS1");
$address1 =~ s/\s+( +)$//;
$address1 = $address1 . (" " x (44-length($address1)));
$city = $dbfh->get_field(`CITY`);
$city =~ s/\s+( +)$//;
$city = $city . ", " . $dbfh->get_
field(`S
TATE`) . " " . $dbfh->get_field(`ZIP`);
$city = $city . (" " x (44-length($city)));
$email = $dbfh->get_field(`EMAIL`);
$email =~ s/\s+( +)$//;
$home_page = $dbfh->get_field(`HOME_PAGE`);
$home_page =~ s/\s+( +)$//;
print $company, "PHONE: ", $dbfh->get_field(`PHONE`), "\n";
print $address1, " FAX: ", $dbfh->get_field(`FAX_NUM`), "\n";
print $city, "EMAIL: <A HREF=\"mailto:", $email, "\">", $email,
"</A>\n";
print " HOME PAGE: <A
HREF=\"http://", $home_page, "\">", $home_page, "</A>\n";
print "<p>\n";
}
print "<p>\n";
print "<hr>\n";
print "USE YOUR VIEWER\`S \"BACK\" OR \"LEFT ARROW\" ICON TO RETURN TO YOUR
PREVIOUS\n";
print "LOCATION\n";
print "</PRE></STRONG>";
$dbfh->close_dbf;
&print_footer;
exit;
sub disp_stru
{
my( $dbfh ) = @_;
$newline="\n";
if ( length($newline) <= 0 )
{
$newline="<BR>\n"
}
for ($i=1;$i<=$dbfh->{`num_fields`};$i++)
{
my ($fn, $ft, $fd, $fl, $fld) = ("f_name$i", "f_type$i","f_disp$i", "f_len$i", "f_ldec$i");
$visiblesize=$dbfh->{$fl};
if ( $dbfh->{$fl} > 80 )
{
$visiblesize=80;
}
printf( `%4d: %10s NAME="%s" SIZE=%d MAXLENGTH="%d" VALUE="%s"`,
$i, $dbfh->{$fn}, $dbfh->{$fn}, $visiblesize, $dbfh->{$fl}, $dbfh->get_field( $dbfh->{$fn} ) );
print $newline;
}
}
#####################
#####################
##
## SUB-ROUTINES
##
# given a title, print the return header
sub print_header {
local($title) = @_;
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>LISTING OFFICE</TITLE>\n";
print "</HEAD>\n";
print "<BODY BGCOLOR = \"#FFFFFF\">\n";
print "<STRONG><PRE>\n";
print "LISTING $title\n";
}
# finish off the HTML page.
sub print_footer {
print "</BODY>\n";
print "</HTML>\n";
}
Thanks,
Ariel
------------------------------
Date: Sun, 14 May 2000 21:49:54 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Displaying more than one match (using XBase)
Message-Id: <391F81F2.6250EE9C@vpservices.com>
Ariel wrote:
>
> How can I get the following script to display more than one match? It works
> fine to display an exact match, such as cust_id=105 (one customer id).
> However, I would like it to display all of the matches, such as cust_id=10
> (customer id`s 101 through 109).
You are apparently using the plain Xbase.pm module rather than the DBI
and DBD::Xbase modules. There are many advantages to using the DBI
version instead. One of the main ones is that there is a huge amount of
documentation for it and there are lots of people who know about it and
can help. Sorry but I have no idea how to do what you are asking with
the plain module, with the DBI version, this is what you need:
my $sth = $dbh->prepare("SELECT * FROM table WHERE cust_id LIKE
'%10%'");
$sth->execute;
while( my @row = $sth->fetchrow_array ) {
# this loop makes an array of fields for each of the rows
# do whatever you want with each row
}
Sorry, I don't know the equivalent for the non-DBI version.
--
Jeff
------------------------------
Date: Mon, 15 May 2000 06:31:13 GMT
From: BOSCH Patrick <bosch@ippa.lu>
Subject: DLL
Message-Id: <391F994D.174C321A@ippa.lu>
This is a multi-part message in MIME format.
--------------AC6F4C330B1AC7BCC86C717A
Content-Type: text/plain; charset=iso-8859-1; x-mac-type="54455854"; x-mac-creator="4D4F5353"
Content-Transfer-Encoding: 8bit
Hello!
Does anyone know wether it's possible to user a dll with perl?
Thanks
Patrick B.
--
Le destinataire est averti du fait que le courrier électronique
et son contenu ne peuvent d'aucune façon engager la Banque à moins
de confirmation écrite.
The reciepient is hereby notified that the electronic mail and
its content do not in any way bind the Bank unless confirmed by
letter.
--------------AC6F4C330B1AC7BCC86C717A
Content-Type: text/x-vcard; charset=us-ascii;
name="bosch.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for BOSCH Patrick
Content-Disposition: attachment;
filename="bosch.vcf"
begin:vcard
n:Bosch;Patrick
tel;cell:+352-021183814
tel;fax:+352-26 29 2 622
tel;work:+352-26 29 2 541
x-mozilla-html:TRUE
url:http://www.bia.lu/
org:Banque Ippa et Associes
adr:;;34, avenue de la Liberte;Luxembourg;;1930;Luxembourg
version:2.1
email;internet:bosch@ippa.lu
title:Marketing and Communication Officer
x-mozilla-cpt:;3
fn:Patrick Bosch
end:vcard
--------------AC6F4C330B1AC7BCC86C717A--
------------------------------
Date: 15 May 2000 06:33:15 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Forms with Perl
Message-Id: <slrn8hv6h6.6vo.efflandt@efflandt.xnet.com>
On Sun, 14 May 2000, Ian <duxbury@kentmere23.freeserve.co.uk> wrote:
>This debugging seems really complicated. Is there no easy way around. I
>copied the code from a website so you may have got the impression that I
>know more than I actually do.
>
>I skimmed through the pages of debugging but I can't seem to find anything
>relating to (offline mode: enter name=value pairs on standard input) what
>ever this is. Any more suggestions. Cheers.
This allows you to test a Perl script using CGI.pm by entering parameters
on the commandline if you are not running it on a webserver. Example:
(offline mode: enter name=value pairs on standard input)
name=Bob
city=London
Then hit Ctrl-D to run the script with those params.
Perhaps you should install a webserver if you want to test it with your
browser. There is PWS on the Win98 CD (or in NT Option Pack 4 for Win95)
if you are writing for a IIS server. Otherwise you may find the Win32
version of Apache useful: http://www.apache.org/
--
David Efflandt efflandt@xnet.com http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/ http://cgi-help.virtualave.net/
------------------------------
Date: Mon, 15 May 2000 04:18:01 GMT
From: "Aran Meuser" <aran@mapcruzin.com>
Subject: Re: Help! Can't find Perl work!
Message-Id: <ZTKT4.5915$qf.33509@typhoon.southeast.rr.com>
Try guru.com too, great stuff there.
I'm assuming you want to be a consultant, so...
#1 -- Spend the time to make a winning resume. Look at all the resources
all over the web with sample resumes, tips and tricks, etc. Oh yeah, and
have it available in word format with references OR experience (one or the
other should get you a job right away).
#2 -- Read up on making proposals. Look at samples, whatever. Just
understand that a proposal is the bases for a contract and should include a
well organized list of all aspects in the project you intend to do.
#3 -- Don't dig yourself a hole! Quote a good amount of hours, keep in mind
other expenses besides your time like internet connection, food,
electricity, time to write the proposal, tech support (if this is free), and
anything else and raise your hourly rate accourdingily.
#4 -- Don't just look local, you can work for anyone from anywhere.
#5 -- Good luck!
If your looking for some quick experience on your resume start with a lower
hourly than your competition. Let them know why you are going so low,
otherwise they'll assume you don't know squat and will hire the next guy up
in price range.
Aran :)
"kj0" <kj0@mailcity.com> wrote in message
news:8fnk5j$k3p$1@panix3.panix.com...
>
>
> Hi! I'm a grad student working a PhD in bioinformatics; I live in
> Boston, MA. I have 6 years of Perl programming experience, mostly
> doing bioinformatics and system's management applications. (FWIW, I'm
> knowledgeable enough to be the "local Perl guru" in a group of about
> 20 grad students and postdocs).
>
> For several months now I've been trying to find part-time work
> programming in Perl in the Boston/Cambridge area, with absolutely no
> success (not even close).
>
> This is surprising to me. Maybe I'm not looking in the right places.
> Is there a clearing house for job openings for Perl programmers in the
> New England area? Any other resources (free or not) for Perl job
> hunters (resume critiquing, head hunters, etc.) I should know about?
>
> Thanks for any suggestions,
>
> Kev
>
>
------------------------------
Date: Mon, 15 May 2000 12:30:13 +0800
From: "workshop" <workshop@modnet.com.au>
Subject: Re: How to replace "\" , HELP!
Message-Id: <958364935.22414@batman>
just do this
$string =~ s/\\/\,/;
"Murvin Ming-Wai Lai" <mmlai@sfu.ca> wrote in message
news:8ficdg$j43$1@morgoth.sfu.ca...
>
> Hi,
> I am currently facing a problem of replacing "\" with other
> symbol/character. When I do $string =~ s/\\/,/; it can't replace the
> "\" with the comma. In stead, it just delete the "\". Also, if I do
> this:
> $in = "C:\dir\dir\file";
> print $in;
> it will only print out C:dirdirfile
> It seems to me that this weird result has to do with the general
> functionality of the back slash. e.g. \d -> all digit,
>
> If anyone has the idea how to deal with the "\", would you please reply to
> this newsgroup? Thank you very much for the help. =)
>
> --
> .........................................................................
> *>>>>Murvin Lai<<<< >>>>--Muffin--<<<< email: murvin_lai@sfu.ca *
> *homepage: http://www.sfu.ca/~mmlai mmlai@sfu.ca *
> `````````````````````````````````````````````````````````````````````````
>
------------------------------
Date: Mon, 15 May 2000 15:47:20 +1000
From: Peter Hill <phill@modulus.com.au>
Subject: Re: How to replace "\" , HELP!
Message-Id: <391F8F68.6D29@modulus.com.au>
workshop wrote:
>
> just do this
> $string =~ s/\\/\,/;
^^
You seem to think that , has some special mystic quality in the second
part of s//, which it doesn't. Hence, in that location "\," reduces to
",", which is exactly what the OP had and which was never at fault.
So to be generous, you've done no harm per se, but we can't have
Australians handing out erroneous advice...
>
> "Murvin Ming-Wai Lai" <mmlai@sfu.ca> wrote in message
> news:8ficdg$j43$1@morgoth.sfu.ca...
> >
> > Hi,
> > I am currently facing a problem of replacing "\" with other
> > symbol/character. When I do $string =~ s/\\/,/; it can't replace the
> > "\" with the comma. In stead, it just delete the "\". Also, if I [snip]
--
Peter Hill,
Modulus Pty. Ltd.,
http://www.modulus.com.au/
------------------------------
Date: 15 May 2000 05:20:52 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Number of things in an array?
Message-Id: <slrn8hv29k.idf.dha@panix6.panix.com>
On Sat, 13 May 2000 14:38:09 -0700, Makarand Kulkarni
<makarand_kulkarni@My-Deja.com> wrote:
>> how do I count the contents of an array ?
>> I have
>> @values
>> how do I know how many values I got ?
>
>$number_of_items = scalar ( @values);
Actually, the scalar() is unnecessary, because the act of using a
scalar variable on the left side of that assignment gives a scalar
context to the right side already.
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Mysticism has no place in programming.
- Larry Rosler
------------------------------
Date: Mon, 15 May 2000 17:14:31 +1200
From: Sam Stone <samstone@hollywoodmonsters.cc>
Subject: PERL on CDROM
Message-Id: <391F87B6.8A0E0DC1@hollywoodmonsters.cc>
Greetings
I have a question someone may have an answer to.
I have a perl program (it makes webpages) and it runs nicely on a server
.
Is there any way possible for me to take that perl program and have it
run on a CDROM disc? Ideally, a way where the user can use the CDROM and
doesn't have to be connected to the Internet.
Any suggestions?
Thanks, Sam Stone
------------------------------
Date: Mon, 15 May 2000 01:46:30 -0400
From: Nico Zigouras <zigouras@mail.med.upenn.edu>
Subject: Re: Programing Question...)
Message-Id: <Pine.OSF.4.21.0005150146000.5862-100000@mail.med.upenn.edu>
Yes I think it is safe to say that EBay is using "some sort of database
backend" ;) I would be suprised if they are using Perl or ASP for their
production systems - probably CGI in C. I am not saying that Perl is not
well suited for these sites, it is just that we all know how Perl is
accepted in corporate America...
> Yup. They're most likely using either normal CGI scripts (using either Perl
> or another language) or Perl scripts using mod_perl with Apache or ASP
> scripts in IIS. They also most likely have some sort of database backend.
> Take a look at the source code for slashdot.org (it's available at
> http://www.slashcode.org)
On Mon, 15 May 2000, Matt Spong wrote:
> Date: Mon, 15 May 2000 01:34:54 -0500
> From: Matt Spong <spong@baked.net>
> Newsgroups: comp.lang.perl.misc
> Subject: Re: Programing Question...
>
> In article <958367444.788227@ftp.mauigateway.com>,
> "Adam" <chillin@mauigateway.com> wrote:
> > If I were to build a build a website, say for example a site like Etrade,
> > Ebay or Classmates.com (I'm not, but it's a good example). What are complex
> > sites as such constructed of besides HTML? Is it Perl and CGI scripts?
>
>
> Matt
>
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
>
------------------------------
Date: Mon, 15 May 2000 00:19:15 -0700
From: "Adam" <chillin@mauigateway.com>
Subject: Programing Question...
Message-Id: <958367444.788227@ftp.mauigateway.com>
If I were to build a build a website, say for example a site like Etrade,
Ebay or Classmates.com (I'm not, but it's a good example). What are complex
sites as such constructed of besides HTML? Is it Perl and CGI scripts?
-Adam
------------------------------
Date: Mon, 15 May 2000 01:34:54 -0500
From: Matt Spong <spong@baked.net>
Subject: Re: Programing Question...
Message-Id: <391f8c71$1_4@corp.newsfeeds.com>
In article <958367444.788227@ftp.mauigateway.com>,
"Adam" <chillin@mauigateway.com> wrote:
> If I were to build a build a website, say for example a site like Etrade,
> Ebay or Classmates.com (I'm not, but it's a good example). What are complex
> sites as such constructed of besides HTML? Is it Perl and CGI scripts?
Yup. They're most likely using either normal CGI scripts (using either Perl
or another language) or Perl scripts using mod_perl with Apache or ASP
scripts in IIS. They also most likely have some sort of database backend.
Take a look at the source code for slashdot.org (it's available at
http://www.slashcode.org)
Matt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
------------------------------
Date: 15 May 2000 05:24:30 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Programmer Required
Message-Id: <slrn8hv2ge.idf.dha@panix6.panix.com>
On Wed, 10 May 2000 04:29:41 GMT, dkh <dalekh@my-deja.com> wrote:
>
>I am a freelance Perl programmer interested in your project. My project
[snip]
>In article <39170237.12385480@barbados.cc>,
> Rob@barbados.cc wrote:
>> Hi,
>> I am in need of a programmer to create and refine a cgi script for a
Rather than post this twice, I suppose I should point out that this
really goes both ways... :-/
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently
to "news.announce.newusers", you might have already known this. :)
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
There is a Perl Jobs Announce list that may be more helpful to you. See
<http://www.pm.org/mailing_lists.shtml> for details.
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Chipmunks are go! - Madness
------------------------------
Date: Sun, 14 May 2000 21:14:24 -0700
From: Xah <xah@xahlee.org>
Subject: Re: tar in Perl, system or not
Message-Id: <B544C7B0.8CC9%xah@xahlee.org>
Here's _my actual code_:
#!/usr/local/bin/perl
use strict;
my $ff = '/disk1/www/home/xah/xxx/strongholdPack/JSDK2.0.tar';
# qx(/usr/local/bin/gzip -cd $ff | /usr/local/bin/tar -xvf -);
# system '/usr/sbin/tar', 'xvf', $ff;
print qx(/usr/sbin/tar -xvf $ff);
__END__
It does not work. It just spits out to STDOUT, e.g.
[xah@localhost ~/productized_prepare_dir]
test.pl
x JSDK2.0, 0 bytes, 0 tape blocks
x JSDK2.0/bin, 0 bytes, 0 tape blocks
x JSDK2.0/bin/servletrunner, 2442 bytes, 5 tape blocks
x JSDK2.0/doc, 0 bytes, 0 tape blocks
x JSDK2.0/doc/apidoc, 0 bytes, 0 tape blocks
x JSDK2.0/doc/apidoc/images, 0 bytes, 0 tape blocks
...
As you can see, there are several variations in my test.pl (some are not
there) but none works.
> The following works for me:
> system 'tar', 'xvf', 'file.tar';
Is this in theory or you actually tested it?
I'm on a Solaris 2.6 box with Perl 5.004xx but i don't that should matter.
Xah
xah@xahlee.org
http://xahlee.org/PageTwo_dir/more.html
> From: Tony Curtis <tony_curtis32@yahoo.com>
> Organization: Highly Unlikely
> Newsgroups: comp.lang.perl.misc
> Date: Sun, 14 May 2000 23:33:10 GMT
> Subject: Re: tar in Perl, system or not
------------------------------
Date: Mon, 15 May 2000 00:14:41 -0500
From: "Andrew N. McGuire" <anmcguire@ce.mediaone.net>
Subject: Re: tar in Perl, system or not
Message-Id: <391F87C1.EC26A880@ce.mediaone.net>
Xah wrote:
>
> Tony Curtis <tony_curtis32@yahoo.com>:
> > Actually you are looking for a file called 'file.tar' in
> > the home directory of user 'xah'. Perl doesn't directly
> > understand the ~USER notation.
>
> You are right, that '~username' does not expand to user's home directory in
> qx. However, that is NOT the reason my program does not work.
>
> My code actually uses full path. Try to untar a tar file in Perl and you'll
> see. The odd thing is that, if you run the same command in shell it works.
Your original example code works fine on Solaris 7,
after replacing the ~xah with an relative or absolute
pathname that does not require expansion. I don't
understand your problem, what error do you get? If the
error is coming from tar, I would post your error
in a *nix group. If it is a Perl error post it here.
Cheers,
anm
--
/*-------------------------------------------------------.
| Andrew N. McGuire |
| anmcguire@ce.mediaone.net |
`-------------------------------------------------------*/
------------------------------
Date: 14 May 2000 22:27:34 -0700
From: Andrew Perrin - Demography <aperrin@davis.DEMOG.Berkeley.EDU>
Subject: Re: tar in Perl, system or not
Message-Id: <u5ku2g0e62h.fsf@davis.DEMOG.Berkeley.EDU>
Xah <xah@xahlee.org> writes:
> Here's _my actual code_:
>
> #!/usr/local/bin/perl
> use strict;
> my $ff = '/disk1/www/home/xah/xxx/strongholdPack/JSDK2.0.tar';
> # qx(/usr/local/bin/gzip -cd $ff | /usr/local/bin/tar -xvf -);
> # system '/usr/sbin/tar', 'xvf', $ff;
> print qx(/usr/sbin/tar -xvf $ff);
> __END__
>
> It does not work. It just spits out to STDOUT, e.g.
>
> [xah@localhost ~/productized_prepare_dir]
> test.pl
> x JSDK2.0, 0 bytes, 0 tape blocks
> x JSDK2.0/bin, 0 bytes, 0 tape blocks
> x JSDK2.0/bin/servletrunner, 2442 bytes, 5 tape blocks
> x JSDK2.0/doc, 0 bytes, 0 tape blocks
> x JSDK2.0/doc/apidoc, 0 bytes, 0 tape blocks
> x JSDK2.0/doc/apidoc/images, 0 bytes, 0 tape blocks
> ...
Forgive me if I'm stating the obvious, but this is exactly what tar
outputs when extracting. From man tar:
x Extract or restore. The named file s are extracted
from the tarfile and written to the directory
specified in the tarfile, relative to the current
directory. Use the relative path names of files
and directories to be extracted.
tar is extracting the files listed above to whatever directory is cwd
for your script.
I'm guessing from your request that what you actually want is the raw
tarred data (am I right?). If so, at least using gnu tar you can use
tar -O to get the data sent to STDOUT instead of restored to disk.
BTW, for me under Solaris 7 and perl 5.00503, your code works just
fine, when "works" is defined as "runs tar and extracts the files to
the cwd".
ap
--
---------------------------------------------------------------------
Andrew J. Perrin - aperrin@demog.berkeley.edu - NT/Unix Admin/Support
Department of Demography - University of California at Berkeley
2232 Piedmont Avenue #2120 - Berkeley, California, 94720-2120 USA
http://demog.berkeley.edu/~aperrin --------------------------SEIU1199
------------------------------
Date: Mon, 15 May 2000 01:12:55 -0400
From: JTJ <jtjohnston@courrier.usherb.ca>
Subject: text counter
Message-Id: <391F8757.3F4B@courrier.usherb.ca>
I've created this little counter thingy, but it doesn't work exactly.
The userstatslog file starts with:
0\t0\t0\t0\t
Each field value (divided by \t) should increment, depending on the
version number of browser type, but all I get when I read the file is:
1\t1\t\t\t
no matter how many times I run the .pl. Therefore, $STATData[2],
$STATData[3] write nothing back into the log file when I write it again.
Where did I screw up? :)
John
An E-Mail would very much, greatly appreciated.
-------------------------------------------------------------------------------------
open(STATSLOG,"$userstatslog");
@STATData = <STATSLOG>;
close(STATSLOG);
foreach $line (@STATData)
{
chop $line;
@STATData = split (/\t/, $line);
}
$STATData[0]++;
if ($in{'APPLIC'} =~ /Netscape/)
{$STATData[1]++;}
if ($in{'APPLIC'} =~ /Microsoft Internet Explorer/)
{$STATData[2]++;}
if ($in{'BVERSION'} =~ /4\./)
{$STATData[3]++;}
open(SLOG,">$userstatslog");
print SLOG "$STATData[0]\t$STATData[1]\t$STATData[2]\t$STATData[3]\t";
close(SLOG);
------------------------------
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 3046
**************************************