[11818] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 5418 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 19 11:12:30 1999

Date: Mon, 19 Apr 99 08:00:22 -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           Mon, 19 Apr 1999     Volume: 8 Number: 5418

Today's topics:
    Re: Adding TCPIP # (Matthew Bafford)
    Re: Another beginner question <gellyfish@gellyfish.com>
    Re: another perlshop question(Entering Store a differen mpowers6422@my-dejanews.com
    Re: another perlshop question... mpowers6422@my-dejanews.com
    Re: Any software convert html code into perl code?? <CoolCyberDude@abigfoot.com>
    Re: compare form input with log file <cj@hum.auc.dk>
    Re: FREE Certifications Offered Online to perl programm pengbo@merseymail.com
    Re: How does ${\(code)} work? (Larry Rosler)
    Re: HTTP_REFERRER (Juho Cederstrom)
    Re: Installation of Perl for Win32 w/o a C compiler <jwarner@tivoli.com>
    Re: LDAP and PERL <gellyfish@gellyfish.com>
    Re: matching more than one line (M.J.T. Guy)
    Re: Multiple submits on a CGI form <clint@drtech.co.uk>
    Re: Need example (Tad McClellan)
        Newbie Question -> Searching a Text File <peej_79@yahoo.com>
        pack format control string help <picardk@runnymede.gov.uk>
        Pay for a searchable Internet Database GBremner@cnbceurope.com
        Perl Mongers - Glasgow, Scotland <Michael.Cameron@no.spam.technologist.com>
        PERL Subroutines in a separate file? <hjenter@srv1rvares.er.usgs.gov>
    Re: PERL Subroutines in a separate file? <tchrist@mox.perl.com>
    Re: Pershop Question mpowers6422@my-dejanews.com
    Re: Running CGI scripts OFFLINE <peej_79@yahoo.com>
    Re: strange problem with fork() <Wm.Blasius@ks.sel.alcatel.de>
    Re: TPJ still shipping? (Jon Orwant)
        Unique Password Question <sallard@netreach.net>
    Re: Unique Password Question <tchrist@mox.perl.com>
    Re: Uploading script. <ours@casema.net>
    Re: VB and Perl <cj@hum.auc.dk>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 19 Apr 1999 13:36:06 GMT
From: dragons@dragons.duesouth.net (Matthew Bafford)
Subject: Re: Adding TCPIP #
Message-Id: <slrn7hm8uh.s9v.dragons@dragons.duesouth.net>

On Mon, 19 Apr 1999 14:21:27 +0930, Wyzelli <wyzelli@yahoo.com>
lucked upon a computer, and thus typed in the following:
) A sample of the file to be parsed is below.
) 
) Wed Mar 31 18:10:17 1999
)  Acct-Session-Id = "0F00007B"
)  User-Name = "user"
)  NAS-IP-Address = 203.39.3.130
)  NAS-Port = 5
)  NAS-Port-Type = Async
)  Acct-Status-Type = Stop
)  Acct-Session-Time = 12
)  Acct-Authentic = RADIUS
)  Connect-Info = "48000 MNP/NONE"
)  Acct-Input-Octets = 2329
)  Acct-Output-Octets = 8
)  Called-Station-Id = "89461300"
)  Acct-Terminate-Cause = User-Request
)  Vendor-Specific = ""
)  Service-Type = Framed-User
)  Framed-Protocol = PPP
)  Framed-IP-Address = 203.39.3.170
)  Acct-Delay-Time = 0
)  Timestamp = 922869617
)  Request-Authenticator = Unverified

Having just had to work with this same log file, here's what I used:

$/="";
while (<>) {
    chomp;
    my ($date, $rest) = split /\n/, $_, 2;
    my(%fields) =
        map { s{^"}{};   s{"$}{};   $_ }
        map { s{^\s+}{}; s{\s+$}{}; $_ }
        map { split /=/                }
        split /\n/, $rest;              

    # ...
}

This lets you access each field using the hash.

my $user = $fields{'User-Name'};

) TIA

HTH,

) Wyzelli

--Matthew


------------------------------

Date: 19 Apr 1999 14:53:50 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Another beginner question
Message-Id: <371b356e@newsread3.dircon.co.uk>

Kevin Genus <kgenus@tidalwave.net> wrote:
> 
> #! no !# ...
> 
> Also, if you are using windows, you do not need that line ... you should
> set up associations and file types using FTYPE and ASSOC commands from
> the command prompt.
> 

Except of course if he does that then he is foregoing the facility of using
any switches that might be applied there - Perl itself does use the shebang
line to determine if any switches should be used regardless of whether the
OS supports running 'interpreted' programs in this way.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



------------------------------

Date: Mon, 19 Apr 1999 13:04:13 GMT
From: mpowers6422@my-dejanews.com
Subject: Re: another perlshop question(Entering Store a different Way)
Message-Id: <7ff9k8$63f$1@nnrp1.dejanews.com>

You can make perlshop work without using just the button.
Use an image instead or a link.
You just have to make sure you pass the hidden values the same way you would
using a button.
for Example:http://www.junk.com/cgi-
bin/mystore/perlshop.cgi?orderid=!ORDERID!...etc.
Look under the documentation for perlshop. There is a blurb on passing the
values. I think it is under the catalog layout sections.
Hope this helped.

Mike





In article <370b12e6.0@news.internex.net.au>,
  "Video Gameplay Sales" <sales@videogameplay.com.au> wrote:
> Great script, one tiny problem..
>
> Is there a way to make it work, without having to go through the "Enter
> Store" crap for it to initialize?
> Too bad if someone arrives at a purchase page without coming through the
> front entry page.....
>
> Any help would be greatly appreciated...
>
> PJ
>
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: Mon, 19 Apr 1999 13:02:56 GMT
From: mpowers6422@my-dejanews.com
Subject: Re: another perlshop question...
Message-Id: <7ff9hs$62i$1@nnrp1.dejanews.com>

You can make perlshop work without using just the button.
Use an image instead or a link.
You just have to make sure you pass the hidden values the same way you would
using a button.
for Example:http://www.junk.com/cgi-
bin/mystore/perlshop.cgi?orderid=!ORDERID!...etc.
Look under the documentation for perlshop. there is a blurb on passing the
values. I think it is under the catalog layout sections.
Hope this helped.

Mike



In article <370BAEF4.EC2535EB@limbo.ne.mediaone.net>,
  Amy Wajda <awajda@limbo.ne.mediaone.net> wrote:
> Check out http://www.sciencekits.com -- they have links to their product
> pages right off of the index page.
>
> Amy
> awajda@limbo.ne.mediaone.net
>
> Video Gameplay Sales wrote:
> >
> > Great script, one tiny problem..
> >
> > Is there a way to make it work, without having to go through the "Enter
> > Store" crap for it to initialize?
> > Too bad if someone arrives at a purchase page without coming through the
> > front entry page.....
> >
> > Any help would be greatly appreciated...
> >
> > PJ
>


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: Mon, 19 Apr 1999 16:17:24 +0200
From: "ccd" <CoolCyberDude@abigfoot.com>
Subject: Re: Any software convert html code into perl code??
Message-Id: <7ffdtc$ipa$1@news.casema.net>

Try this: http://www.casema.net/~dolman/s (Programming>Perl)

You'll find a program here that converts a html file into Perl prints.



Kevin !;!;!;!;!;!;!;!;!;!;!;!;!;!;!;!;!;!;!;!;!; heeft geschreven in bericht
<7fc6t0$5pv11@news1.cityu.edu.hk>...
>
>Any software convert html code into perl code??
>
>HE and SHE - %L )M &o  :
>======================
>http://start.cgirealm.com/heshe1/
>
>
>




------------------------------

Date: Mon, 19 Apr 1999 15:49:34 +0200
From: Christian Bastholm Jensen <cj@hum.auc.dk>
To: Sheila Eugenio <seugenio@man.amis.com>
Subject: Re: compare form input with log file
Message-Id: <371B346E.32BCBD61@hum.auc.dk>

HI,

If you want to compare your logfiledata with the input from a HTML-form then try
this:

use CGI qw(:all);
$q = new CGI;
$passwd = $q->param('password');
$username = $q->param('username');

print "Content-type: html/text\n\n";
print "<HTML>\n";
print "<BODY>

open(FILE, $logfile) || die;
@sorted = sort(<FILE>);
foreach $pair (@sorted) {
@entry = split (/::/, $pair);
  if ( ($entry[0] eq $username) && ($entry[1] eq $passwd) ) {   $ok=1;   }
}
close(FILE);

if ($ok == 1) { print "You've got access\n"; } else { print "Go home..\n"; }

print "</BODY\n";
print "</HTML>\n";


Sheila Eugenio wrote:

> Hi,
>         I have a log file with the ff. format. The first two are username and
> password respectively. I am having trouble with comparing the user input
> with these two.
>
> ISD:ipre:sroque@man.amis.com:Sheila:Eugenio:::::::::::::::::::::::::0
> BMG:troy:trodriguez@man.amis.com:Troy:Rodriguez:::::::::::::::::::::::::0
> HED:sample:ldavid@man.amis.com:Ana Liza:David:::::::::::::::::::::::::0
>
> Here's a part of my code:
>
> $log = 'f:/ama/amdata.db';
> $username = $q->param(username');
> $password = $q->param('password');
>
> open (PEOPLE, "$log") or die "Cannot find log file: $!";
>
> while ($line = <PEOPLE>) {
>         @data = split(/\:/, $line);
>         #stopped here because it's not getting any better :-)
> }
>
> if ($FORM{'username'} ne ???) {
>         print "HTTP/1.0 200 OK\n";
>         print "Content-type: text/html\n\n";
>         print "<HTML><HEAD><TITLE>Access Denied</TITLE></HEAD>\n";
>         print "<BODY><H1>Access Denied</H1>",$FORM{username},"  username you
> supplied does not exist.<P>\n";
>         print "<a href=http://go/back.htm>Please try again</a>\n";
>         print "</BODY>\n";
>         print "</HTML>\n";
>
> } elsif ($FORM{'password'} ne ???) {
>
> Thanks all for your help!



------------------------------

Date: Mon, 19 Apr 1999 12:53:35 GMT
From: pengbo@merseymail.com
Subject: Re: FREE Certifications Offered Online to perl programmers
Message-Id: <FAFt5B.IAI@csc.liv.ac.uk>

In article <joe.mcmahon-1604991155330001@prtims.stx.com>,
joe.mcmahon@gsfc.nasa.gov (Joe McMahon) writes:
> 
> Plus 90% of the questions were "what output does this give". Well, since
> I have Perl running in the  other window here - cut paste ... 

Didn't everyone with any common sense? So far only Larry has admitted to
NOT doing this.

Admittedly I got an embarassingly low 3.29 but hell everyone has to start
somewhere.

> 
> I agree on the Tk question. Never use it. You also noted the crypt question
> in which two answers were identical - AND wrong?

Ok I admit, I would like to know what I got wrong but look as hard as I
could I couldn't find the results of my test anywhere. The original
message did imply they where available. So anyone care to enlighten me as
to where they are/where?

JAPN


------------------------------

Date: Mon, 19 Apr 1999 06:14:27 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How does ${\(code)} work?
Message-Id: <MPG.1184cc0dcfb143e79898d8@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <7ff08q$dr1$1@taliesin.netcom.net.uk> on Mon, 19 Apr 1999 
11:30:35 +0100, Clinton Gormley <clint@drtech.co.uk> says...
> I I use this feature all the time :
> 
>     print "Text text text ${\((foo==bar)?'abc':'def')}";
> 
> and it works a treat,  But how does it work?
> 
> What does the ${\()} bit do?

As usual for such things, work it from inside to out.

()     # evaluate an expression (in scalar context)
\()    # create a reference to the value of the expression
${\()} # dereference and interpolate the value

The inner parentheses aren't necessary for simple expressions such as 
function calls:

${\foo('bar')}

To evaluate that same function call in list context, use this:

@{[foo('bar')]}

which you now should be able to decipher using the same methodology as 
for the scalar case.

Like many other seemingly bizarre Perl incantations, once you get the 
hang of it the mystery goes away.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Sun, 18 Apr 1999 19:39:26 +0300
From: cederstrom@kolumbus.REMOVE_THIS.fi (Juho Cederstrom)
Subject: Re: HTTP_REFERRER
Message-Id: <slrn7hk2lu.e7.cederstrom@vortex.cede.net>

On Sat, 17 Apr 1999 22:44:17 -0400,
     The Internet DJ <webmaster@internetdj.com> wrote:
> $good_ref = "http://www.mysite.com";
> 
> if ($ref != $good_ref) {

Maybe something like this would work:

$_ = $ref;
if( /http:\/\/www\.mysite\.com/ ) {
    # ...
}

Well, you could use $ref in the if line too, but I can't
get tilde out of my keyboard so I can't show how :(

And slashes should be replaced by something else, so you
wouldn't need to use \/\/


-- 
# This is a Perl-script which will display juhoc's email address
$_  = "ohuj s'ciameda lserdsi sdec tsreAmorlokTubmuTODsfi";
s/(.)(.)(.)(.)/$4$3$2$1/g;s/AT/\@/;s/DOT/\./;print $_."\n";




------------------------------

Date: Mon, 19 Apr 1999 09:36:15 -0500
From: John Warner <jwarner@tivoli.com>
Subject: Re: Installation of Perl for Win32 w/o a C compiler
Message-Id: <371B3F5E.58D7B1E9@tivoli.com>

ActiveState makes the ofiicial Win32 Perl (like what you would find on CPAN).
Checking their site frequently will keep you up to date.  As for your C compiler
problem, go to www.gnu.org and pick up a C compiler there--that is if your
sysadmin will allow to install it in your Win32 systems.  Or you could do what I
did:  jump up and down in your boss' office until he gives in and gets you a C
compiler. ;-)

On a different note, while Win32::GUI may be cool, using Tk will make your code
far more portable.

Hope this helps.

Thimal wrote:

> Hi,  I'm pretty new to Perl, but I find that it is an excellent language for
> most things that took me ages to do on C, but sadly, the place that I have
> access to Unix Perl, won't allow me to install my own packages... which is
> kinda irritating, especially when I want to experiment with stuff... so I
> picked up on ActiveState Perl build 515 for Win32... then I went on and found
> out about Tk... and at about that time, I also installed Gurusamy Sarathy's
> Win32 port of Perl 5.004_02 on my machine... this has Tk and some other nice
> modules besides... but the problem is this.... I don't have access to any of
> the C compilers that are required for building Perl from source, so I have to
> rely on binary versions.. but this means that I don't have the latest
> versions of Win32 Perl.... and nor will I get most of the important
> modules... like Tk 8x, and the later versions of DBI and the DBD drivers...
> Can anyone please point me to binaries of Win32 perl that are a bit more
> recent than the versions above... ? Thanks in advance.. I've checked some
> CPAN sites, and been to Perl.com, but to no avail....
>
> Thimal PS : The main reason for still using the GS port of Perl is because
> the excellent Win32::GUI module is as yet unsupported by the Activestate
> build.. :o)
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

--

John Warner                      Tivoli Systems Inc.
Sales Support Engineer           9442 Capital Of Texas Hwy North
Sales Infrastructure Group       Austin, TX 78759
john_warner@tivoli.com




------------------------------

Date: 19 Apr 1999 14:37:32 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: LDAP and PERL
Message-Id: <371b319c@newsread3.dircon.co.uk>

michielpeene@my-dejanews.com wrote:
> Is there anyone who knows if there's a module for PERL to access an X.500 LDAP
> directory, and where to find it?
> Thanks!
> Michiel Peene
> michielpeene@my-dejanews.com
> 

There is of course

<http://www.perl.com/CPAN/authors/id/GBARR/perl-ldap-0.10.tar.gz>

You might also want to check out :

<http://www.mozilla.org/directory/>

Of course where you should have started is :

<http://www.altavista.com/cgi-bin/query?pg=q&kl=XX&q=LDAP>

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



------------------------------

Date: 19 Apr 1999 14:55:07 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: matching more than one line
Message-Id: <7ffg4b$drk$1@pegasus.csx.cam.ac.uk>

Tad McClellan <tadmc@metronet.com> wrote:
>paul winston (winstonrp@worldnet.att.net) wrote:
>: > ($file) = @ARGV;
>    ^     ^
>
>   What are those parenthesis for?

Err.. to ensure that $file isn't set to 1 or whatever?


Mike Guy


------------------------------

Date: Mon, 19 Apr 1999 14:46:31 +0100
From: "Clinton Gormley" <clint@drtech.co.uk>
Subject: Re: Multiple submits on a CGI form
Message-Id: <7ffbo6$fih$1@taliesin.netcom.net.uk>

I think what I'm asking is this :

The second submit  creates a new process which detects that the request is
already being processed.  How could you join the second process to the first
process so that the user would see the appropriate result.

So could you make the second process wait for the results of the first
process and then return those results?

Thanks

Clint


Tony Kenny <tony@emailcyberscape.net> wrote in message
news:924519705.29909.0.nnrp-11.c2de1237@news.demon.co.uk...
> When you build the form the user is about to submit, why nto give it a
> unique ID, then, if that form is submitted twice, your system already
knows
> that that unique ID has ana ction against it and the appropriate action
can
> be taken on a second submit.
>
>
> Tony Kenny
>
>




------------------------------

Date: Mon, 19 Apr 1999 04:17:47 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Need example
Message-Id: <broef7.1a2.ln@magna.metronet.com>


[ stealth Cc is evil. Besides off-topic postings, you also should
  not do stealth Cc's.

  You will get more from Usenet if you understand how Usenet works.

  news.announce.newusers   newsgroup has several posts that will
  help you get more from Usenet.
]


Jim (jim@newglobal.net) wrote:
: Well, let's see...Forms > cgi > perl.

: Interesting how that works!

   Forms > cgi > C++

   Forms > cgi > Visual Basic

   Forms > cgi > Bourne shell


   How you maintain state in CGI is the same no matter what
   language you chose to implement your program in.

   That is, the answer to your question does not depend on
   any particular programming language.

   So it is off-topic in a language newsgroup.

   It would be on-topic for the newsgroup that I pointed you to.



: Do you need any more help understanding my question, Mr. Perl Programming man?


   I understand your question just fine.

   If you had asked it in an on-topic newsgroup, I would have
   told you the answer.


: Or do you have nothing else better to do than start some stupid flame war on
: what I thought would be a helpful newgroup?


   Less than half the people in the Perl newsgroup know about
   CGI stuff, since Perl is used more often for things other
   than CGI.

   The people who know about CGI stuff hang out in the CGI
   newsgroup.

   I thought you would have a better chance of getting your
   question answered over there.

   I think you can count on not getting anymore help from me.


: In the mean time, KMA!


   Very eloquent and intellectual.


      *plonk*



: Tad McClellan wrote:

: > Jim (jim@newglobal.net) wrote:
: >
: > : I've been searching for an example of how to pass  the contents of one
: > : form to another.
: > : What I want to achieve is a form that when a user chooses option(1) then
: > : the user will be served another script, and another form. Same for
: > : option(2), etc....
: >
: > : If there's a howto someone could direct me  to I'd be very grateful,
: >
: >    What is your Perl question?
: >
: >    This is the Perl newsgroup.
: >
: >    The answer to your question is likely "hidden" is a newsgroup
: >    that is connected in some way to WWW stuff.
: >
: >    This is not such a newsgroup.
: >
: >    This is:
: >
: >       comp.infosystems.www.authoring.cgi


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 20 Apr 1999 00:26:46 +1000
From: "Paul Gregor" <peej_79@yahoo.com>
Subject: Newbie Question -> Searching a Text File
Message-Id: <j5HS2.44$QO.1214@nswpull.telstra.net>

Hello all,

To start off with I am sorry if this post is too the wrong NG.

I have a win95 LAN at home with TinyWeb HTTP server running on the main PC.
I have ActivePerl 5.14 installed on the main PC. I have a Perl Script that I
got from http://www.technotrade.com/cgi/search.html

The perl script and the text file that it searches resides in the cgi-bin
dir.

When I perform a search on the other PC I receive a "Document Contains No
Data" error.

Is there a problem with the pearl script?
Or is it my setup thats the problem?

Any help on this would be greatly appreciated.

Paul Gregor




------------------------------

Date: Mon, 19 Apr 1999 14:01:45 GMT
From: Keith P <picardk@runnymede.gov.uk>
Subject: pack format control string help
Message-Id: <7ffd03$9ae$1@nnrp1.dejanews.com>

I am trying to teach myself Perl and have encountered an impasse using the
unpack function.  Attempts to port the tailwtmp program (Perl Cookbook 8.18)
from Linux to Solaris have progressed badly.  In particular, I am unable to
translate Solaris utmp structure into the necessary format control string.

Here is the Solaris utmp structure from the utmp man page:

struct utmp {
char  ut_user[8];    /* user login name */
char  ut_id[4];	     /* /sbin/inittab id */
char  ut_line[12];   /* device name (console, lnxx) */
short ut_pid;	     /* process id */
short ut_type;	     /* type of entry */
struct exit_status {
  short e_termination;	/* process termination status */
  short e_exit;		/* process exit status */
} ut_exit;		/* exit status of a process
/* marked as DEAD_PROCESS */
time_t ut_time;		/* time entry was made */
};

Here is the my incorrect format control string:

	a8 a4 a12 s s s s ???

I have used a rather than A for the character items because the od bc
output from utmp looks like the character fields are null padded.  Also, I can
see no obvious date string from which to calculate a format for ut_time above.

CPlease, could someone who has more experience with unpack and/or Solaris
structures tell me what is necessary?

--
Keith Picard

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: Mon, 19 Apr 1999 13:01:21 GMT
From: GBremner@cnbceurope.com
To: GBremner@tad.co.uk
Subject: Pay for a searchable Internet Database
Message-Id: <7ff9es$61j$1@nnrp1.dejanews.com>

Looking to redesign The Actors Directory (http://www.tad.co.uk) database and
would be grateful for all quotes and detailed questions you would like to
fire at me. This service was initially established as a subscription based
service some time ago, but proved to costly and uneconomical to maintain. The
planned redesign has come together with the recent gain of new funds and
strategies for development.

The new service will be completely free and run automatically without much
maintenance any UK registered actor will add their details into the TAD
database using comprehensive application forms for their details. There should
also be the facility for inclusion of pictures, audio and video although these
will be at cost due to hosting issues. There should also be a facility for
searching the info on the actors as per the original design including the
different fields listed. Once a search has been carried out and the desired
actor has been found there will be a charge for gaining there contact details.

The site already has the later, a searchable database, although the
maintenance and monitoring of the database has been to time consuming . The
plan would be to offer free inclusion of details, free searching and fee paid
for the contact details. This is similar to services used for dating sites
such as (http://www.webpersonals.com/wp.epl).

We are a very small company with limited resources and funding, but are keen
to offer a good service that is self maintaining. I lookforward to your
quotes comments and suggestions



Grant Bremner
Managing Director
GBremner@tad.co.uk

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: Mon, 19 Apr 1999 14:32:10 +0000
From: Michael Cameron <Michael.Cameron@no.spam.technologist.com>
Subject: Perl Mongers - Glasgow, Scotland
Message-Id: <371B3E6A.5B9442A3@no.spam.technologist.com>

I am interested in the above group - I have tried contacting the address
on the www.pm.org page (jer@onlymedia.com) a couple of times but to no
avail.

Is anyone else interested in a Glasgow group?  Does it already exist?
Are there any active groups elsewhere in Scotland?

Thanks,

Michael





------------------------------

Date: Mon, 19 Apr 1999 13:24:06 GMT
From: Harry Jenter <hjenter@srv1rvares.er.usgs.gov>
Subject: PERL Subroutines in a separate file?
Message-Id: <371B2E76.8382BE8A@srv1rvares.er.usgs.gov>

Hi,

I am relatively new to perl, but am trying to write a suite of
scripts for some web work we are doing.   I have several
subroutines that are common to each of the scripts.  Is there a
way that I can keep the perl code as a single copy in a separate
file and just include the contents of that file in each of my
scripts?  That way, any changes I make in the subroutines in the
future will be automatically propagated to the scripts without me
having to edit each script and remember where I may or may not
have used the subroutine.

I have looked briefly at some instructions for creating a module,
but I don't understand them at all.  If the answer to this
problem is "write a module", could you please include some kind
of pointer to an easy tutorial for doing so? 

Thanks for any help you can provide.

-Harry
-- 
Harry L. Jenter                        hjenter@usgs.gov
USGS                                   (703) 648-5916 | FAX (703)
648-5484
Mailstop 430, National Center          "The lottery is just a tax
on
Reston, Virginia 20192                   people who are bad at
math."


------------------------------

Date: 19 Apr 1999 08:06:51 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: PERL Subroutines in a separate file?
Message-Id: <371b387b@cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    hjenter@usgs.gov writes:
:I am relatively new to perl, but am trying to write a suite of
:scripts for some web work we are doing.   I have several
:subroutines that are common to each of the scripts.  


    require 'library.pl';
or
    require 'Module.pm';
or 
    require Module;
or
    use Module;
or
    use Module qw(import list goes here);

:I have looked briefly at some instructions for creating a module,
:but I don't understand them at all.  If the answer to this
:problem is "write a module", could you please include some kind
:of pointer to an easy tutorial for doing so? 

First, learn the differences between do, require, and use.
Then learn the difference between programs, libraries, and modules.
Now, get a simple library working.  
Finally, write a module.

   %  man perlfaq7

   ..

   How do I create a module?

   A module is a package that lives in a file of the same name.  For
   example, the Hello::There module would live in Hello/There.pm.  For
   details, read the perlmod manpage.  You'll also find the Exporter
   manpage helpful.  If you're writing a C or mixed-language module with
   both C and Perl, then you should study the perlxstut manpage.


There's more in that FAQ for you, like hacking on @INC.

--tom
-- 
    Real Programmers think better when playing Adventure or Rogue.


------------------------------

Date: Mon, 19 Apr 1999 13:15:04 GMT
From: mpowers6422@my-dejanews.com
Subject: Re: Pershop Question
Message-Id: <7ffa8g$6sb$1@nnrp1.dejanews.com>

I have had ISP's do back-ups on my work and lose information without them
telling me.

Check your enter store page and the passing of your order id. #3 is because of
the the order id. Somewhere your script is dropping the order id which is your
token. Check you token directory when you enter the cart see if it shows up
with a new one. View your source, check the directory and match your id's up.
Make sure your getting a new id when you enter unless you have cookies.

Feel free to email me if this does not help.

Mike


In article <37096CBE.B8C721AF@rockymountainwebtech.com>,
  erik@rockymountainwebtech.com wrote:
> Have you possibly upgraded to the new version of perlshop and then this
> happened or is this the same version with literally no intervention from you
> when it started acting up??
>
> Arnold Goldman wrote:
>
> > Hello Perl Guru's:
> >
> > I have a question regarding a Perlshop problem that has cropped up. I've
> > had this great free program installed on my website and running
> > flawlessly for 5 months when suddenly it went down, inexplicably,
> > without any changes to the set-up on my part. The server, 9netave out of
> > N.J. says that many people have been encountering the same error, out of
> > the blue, which reads:
> >
> > "Invalid Transmission #3 received from: xxx.xxx.xxx.xx If your
> > connection was interrupted, you must Enter the shop from the beginning
> > again."
> >
> > Unfortunately the creator of this program is unavailable or unwilling to
> > provide the fix if indeed one exists. Lots of store fronts are biting
> > the dust and no one seems to have the answer. Is there anyone out there
> > that has experienced this problem and has the fix?
> >
> > arnold@monstermakers.com
>
> --
> Erik Boles
> Rocky Mountain Web Tech
> 360.425.0952
> http://www.rockymountainwebtech.com
> erik@rockymountainwebtech.com
> ICQ 1346492
>
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: Tue, 20 Apr 1999 00:44:49 +1000
From: "Paul Gregor" <peej_79@yahoo.com>
Subject: Re: Running CGI scripts OFFLINE
Message-Id: <dmHS2.47$QO.1320@nswpull.telstra.net>


Radiac <kenny@larkrise.force9.co.uk> wrote in message
news:EebN2.1313$54.1191@wards...
> I use tinyweb as my web server. it is literally tiny - less than 100k
iirc.
> I point that in the direction of a directory holding my website. in there
i
> have a directory called cgi-bin. Having installed perl v5 and associated
 .pl
> files with perl.exe, all i have to do is go to, for eg,
> http://127.0.0.1/cgi-bin/script.pl in ie. very simple.
>
>
I am running the same setup with TinyWeb and Perl v5. Every time I got to
execute my pearl script I get I "document contains no data" error on the
other PC on my 2 PC Win95 LAN. The script that I am using is to search a
text file. I got it from http://www.technotrade.com/cgi/search.html
Do I need to change the usr/local/bin line?, or doesn't that matter because
Perl v5 has associated with .pl extensions.

Any help on this would be greatly appreciated

Paul Gregor




------------------------------

Date: Mon, 19 Apr 1999 16:06:21 +0200
From: William Blasius #42722 <Wm.Blasius@ks.sel.alcatel.de>
To: Dennis Wetzig <dennis@bilbo.iok.net>
Subject: Re: strange problem with fork()
Message-Id: <371B385D.41C67EA6@ks.sel.alcatel.de>

[ a copy of this post was sent to Dennis Wetzig <dennis@bilbo.iok.net> ]
Dennis Wetzig wrote:
> 
> Hi,
> 
>         I wrote the following piece of code to explain my problem:
> 
> ----
> $count=0;
> 
> while($count<2)
>         {
> 
>         if($pid=fork())
>                 {
>                 print "Parent here...\n";
>                 }
>         elsif(defined($pid))
>                 {
>                 print "Child here...\n";
>                 exit(0);
>                 }
> 
>         $count++;
>         }
> exit(0);
> -----
> 
> If I execute that program I get the following output:
> 
> Parent here...
> Child here...
> Child here...
> Parent here...
> 
> That is right what I expected. But whenever I pipe the output into a
> file,
> the file includes:
> 
> Child here...
> Parent here...
> Child here...
> Parent here...
> Parent here...
> 
> You agree that this is one line more than I should expect, right?
> 
> Well, I am clueless how to explain that. If you are not, then please
> let me know ;-)

When you execute the second fork, the child inherits the contents
of the STDOUT buffer which has not been flushed yet. When the new
output from child is written, the old output from the parent will
be included. Use $| = 1 to fix it.

from man perlvar:

     $OUTPUT_AUTOFLUSH

     $|      ..Note that STDOUT will typically be line buffered
             if output is to the terminal and block buffered otherwise.
             Setting this variable is useful primarily when you
             are outputting to a pipe, such as when you are
             running a Perl script under rsh and want to see the
             output as it's happening...
hth

Wnm Blasius
-- 
* I am Pentium of Borg. Division is futile. You will be approximated. *
 ...now I'm <wm.blasius@ks.sel.alcatel.de> - no matter what my mail
server says!


------------------------------

Date: 19 Apr 1999 14:35:21 GMT
From: orwant@rising-sun.media.mit.edu (Jon Orwant)
To: Wappinger Mary <revjack@radix.net>
Subject: Re: TPJ still shipping?
Message-Id: <ORWANT.99Apr19103521@rising-sun.media.mit.edu>


Wappinger Mary <revjack@radix.net> writes:
   Is The Perl Journal still shipping? I ordered a year's subscription and
   all the back issues almost a month ago, and I have yet to receive them.
   Mail to Mr. Orwant doesn't seem to be getting me anywhere.

Mary,

I haven't received your order, and I haven't received your mail.
Of course TPJ is still shipping.  

I do have a Brobdingnagian inbox, and most of my messages take
me longer to reply to than I'd like, but there's nothing there
from either /wappinger/i or /revjack/i.  

My inbox is now on High Wappinger Alert, however, and if you
send me mail I'll reply within minutes.  

Go on.

Test me.

-Jon

------------------------------------
Jon Orwant            http://tpj.com
Editor & Publisher, The Perl Journal





--


------------------------------

Date: Mon, 19 Apr 1999 08:29:52 -0500
From: "Scott Allard" <sallard@netreach.net>
Subject: Unique Password Question
Message-Id: <7ffb39$97g$1@ponape.netreach.net>

     I'm trying to design a site with access to members only.  The members
have numbers that are stored in a database.  The visitor has to type in
his/her member number before they get in.  All I need is the perl/CGI code
for checking through the database, and allowing access if they are there. 
Somebody, somewhere must have something like this already made.  If so, I
would be HIGHLY appreciative of the help!  I could do some graphic design
work in return :-)
sallard@netreach.net


------------------------------

Date: 19 Apr 1999 08:11:32 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Unique Password Question
Message-Id: <371b3994@cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    "Scott Allard" <sallard@netreach.net> writes:
:     I'm trying to design a site with access to members only.  

Then please choose a newsgroup that's related to "sites".  There are
web, cgi, and sysadmin-related newsgroups.  This isn't one of them.
You wouldn't go to comp.lang.c for someone to tell you how to write this
if it were C, so why come here?

:The members
:have numbers that are stored in a database.  

Define database.  Do you mean "file"?  Why didn't you say that?

:The visitor has to type in
:his/her member number before they get in.  All I need is the perl/CGI code
:for checking through the database, and allowing access if they are there. 

What is "perl/CGI code"?  You mean perl code?  You mean details about
how to configure Apache properly?

Also, what's to stop people from cracking it with simple try-all-numbers
probing?  What about passwords?  

Please see your systems, network, and web adminstrators for help setting
up a web site.  Or find the right newsgroup.

--tom
-- 
Perle, plesaunte to prynces paye/ To clanly clos in golde so clere,
Oute of oryent, I hardyly saye/ Ne proued I neuer her precios pere.


------------------------------

Date: Mon, 19 Apr 1999 16:37:36 -0700
From: "Ours" <ours@casema.net>
Subject: Re: Uploading script.
Message-Id: <7fff42$k15$1@news.casema.net>

yeah...I know. But that does not help me at this moment
Ozette Brown wrote in message <371795FF.CF4D8CBA@infotechfl.com>...
>Yes,
>
>Remember, CGI.pm is your friend.  Start investing in the book, "Official
Guide
>to Programming with CGI.pm".
>
>Thanks,
>
>Ozette
>
>Ours wrote:
>
>> Hi All,
>>
>> I would like to have a script (write) that would upload an attachement to
my
>> server.
>> Idea is to be able to browse my local drives and find the source-file and
>> then press UPLOAD to upload to a remote server.
>>
>> Is this at all possible and can someone point me in the right
direction/hand
>> me the script?
>>
>> Thanks,
>>
>> MW
>
>--
>Ozette Brown <Ozette.Brown@Infotechfl.com>
>Webmaster - Systems Analyst, Infotech Inc.
>5700 S.W. 34th St. Suite 1235      Phone:  352-375-7624
>Gainesville, FL 32608-5371         Fax:    352-373-9586
>
>




------------------------------

Date: Mon, 19 Apr 1999 16:08:55 +0200
From: Christian Bastholm Jensen <cj@hum.auc.dk>
Subject: Re: VB and Perl
Message-Id: <371B38F7.CC3AA5B4@hum.auc.dk>

Hi,

You could use the PDK from ActiveState to bukl you .dll objects and then
access them as pr usual from VB.. but why use VB? It sucks - use Perl/Tk
instead....

Philip Newton wrote:

> Brad Hilton wrote:
> >
> > How can I integrate Perl into VB?
>
> No need to ask in quintuplicate; this isn't the civil service, you know.
>
> Cheers,
> Philip



------------------------------

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 5418
**************************************

home help back first fref pref prev next nref lref last post