[11190] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4790 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 31 12:07:17 1999

Date: Sun, 31 Jan 99 09:00:24 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 31 Jan 1999     Volume: 8 Number: 4790

Today's topics:
    Re: activeperl ppm help <emperry@swbell.net>
    Re: advertising script problem <abey@hill.ucr.edu>
        Check if a file is open <dan.albertsson@swipnet.se>
        code to recurse directories (sysop)
    Re: Date and Time handling routines in Perl (Steffen Beyer)
        Dial up Networking and PERL <gary@altmedia.freeserve.co.uk>
        Double Writing in Logs... Why? <preble@ipass.net>
        Freelance Work Postings? <stoic@my-dejanews.com>
    Re: HELP!!!   Using XS With C++ (Edwin Litterst)
        How do I define and use typedef  in perl? (Ron)
        How do I define and use typedef  in perl? (Ron)
    Re: How to do query in a list? <abey@hill.ucr.edu>
    Re: How to do query in a list? (Larry Rosler)
    Re: How to support both short and long option styles? (Marc Haber)
        localtime() <mfoley@richmond.net>
        London, highly skilled perl programmer required danny@dircon.co.uk
        Looking for Sample Code - Listing Module <gpace@i-2000.com>
    Re: Multi Line Print rsarcomo@my-dejanews.com
    Re: Newbie question <abey@hill.ucr.edu>
    Re: NEWBIE: Premature end of script header <rblench@clover.net>
    Re: ok please don't shoot me for this question (Randal L. Schwartz)
    Re: Perl Crashes IIS4! <Arved_37@chebucto.ns.ca>
        Proposed module: GTK_Dialog <ac212@cam.ac.uk>
    Re: Sending email info@gadnet.com
    Re: sending mail attachment from script <preble@ipass.net>
        simple database (Cim)
    Re: Visual Perl? ("D.Taylor")
    Re: Yahoo, proxys and perl (Randal L. Schwartz)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sun, 31 Jan 1999 05:08:19 -0600
From: Edward Perry <emperry@swbell.net>
Subject: Re: activeperl ppm help
Message-Id: <36B439A3.6431@swbell.net>

> If you are behind a firewall, you have te set some environment
> variables. Check the documentation which comes with ppm for details !

Thanks for reply. I always RTFM! I should have mentioned, no proxy,
no firewall, no errors on install, a real 'standard' W95 setup.

I was hoping someone would say activestate is having a problem today,
try later or give me some additional trouble shoot info.  Seems it 
'just works' for everybody but me! Anybody?

Thanks,

EdVenture


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

Date: Sun, 31 Jan 1999 03:05:27 -0800
From: Abraham Grief <abey@hill.ucr.edu>
To: "myname@mydomain.com" <elst.fels@ping.be>
Subject: Re: advertising script problem
Message-Id: <Pine.LNX.4.05.9901310303290.15768-100000@hill.ucr.edu>


On Sun, 31 Jan 1999, myname@mydomain.com wrote:

> If you use the script with 10 images for instance and you need an image to
> appear 20% of all images you can use the same images twice in the
> randomizer. An other image needs to appear 10% and you only use one image.
> 
> Is this line of thinking correct, or ... ?

You could do that, or you could just give that image a bigger range of
random numbers.



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

Date: 31 Jan 99 16:03:46 GMT
From: "Dan Albertsson" <dan.albertsson@swipnet.se>
Subject: Check if a file is open
Message-Id: <01be4d33$4f47f7e0$6701a8c0@dan>

In a multiuser environment you can create a lock file when you want to
avoid simultaneous update of a file and check that the lock file does not
exist before you open the file you want to update.

But then if your program crash the lock file is still there.

Is it instead possible to directly see if the file you are opening is
already opened by another user?

/dan

PS. Can someone recomend reading of locking techniques in multiuser
environments.



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

Date: Sun, 31 Jan 1999 15:18:34 GMT
From: grynberg@hotmail.com (sysop)
Subject: code to recurse directories
Message-Id: <36b473bd.36328725@news.netvision.net.il>

Hi. I am trying to write a program to print all the files on my hard
drive, with their complete paths. I was wondering if anyone has
anything like this.

I do not want to use modules, I would like to see the perl code
itself. It does not seem difficult, and indeed I have no trouble going
into directories, but it does not come back up.

Thanks for any help


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

Date: 31 Jan 1999 09:15:45 GMT
From: sb@engelschall.com (Steffen Beyer)
Subject: Re: Date and Time handling routines in Perl
Message-Id: <791701$jh0$1@en1.engelschall.com>

risermun@hotmail.com wrote:

> I am looking for routines that will find the difference between two dates and
> return an integer value and/or the day of the week. Also routines which give
> you the difference between two time values and return number of seconds and a
> routine which will add seconds to a time value (e.g. 13:30) and give you the
> time after addition.

> I am hoping there is a public domain library out there which includes routines
> like above. If it helps, I am programming on UNIX.

Please read the FAQ(ing) manual >;-) - man perlfaq or perldoc perlfaq.

Also see Date::Manip and Date::Calc on CPAN at

    http://www.perl.com/CPAN/modules/by-module/Date/

HTH.
-- 
    Steffen Beyer <sb@engelschall.com>
    http://www.engelschall.com/u/sb/download/    (Free Perl and C Software
    http://www.perl.com/CPAN/authors/id/STBEY/         for Download)
    New: Build'n'Play 2.1.0 (all-purpose Unix batch installation tool)
    http://www.oreilly.de/catalog/perlmodger/bnp.html


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

Date: Sun, 31 Jan 1999 12:53:26 -0000
From: "gary robson" <gary@altmedia.freeserve.co.uk>
Subject: Dial up Networking and PERL
Message-Id: <791jp8$81p$1@news4.svr.pol.co.uk>

Can anybody tell me how to connect and hangup and windows Dial up Networking
account from perl.
                    Cheers Gary




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

Date: Sun, 31 Jan 1999 11:07:20 -0500
From: "E. Preble" <preble@ipass.net>
Subject: Double Writing in Logs... Why?
Message-Id: <Ee%s2.752$24.1913@news.ipass.net>

I have several cgi (perl) log file programs (some that I've
written, some that others have written). The common thread to all
of them is that they all seem to "double log" things occasionally.
Anyone know why?  Does it have to do with the flock command (to
prevent file corruption) or possibly the way that browsers
actually retrieve the document?  Any workarounds?

E. Preble

--
Datatrend Software
http://www.datatrendsoftware.com
mailto:info@datatrendsoftware.com

Grab It! software for Excel 97
Digitizes data from charts and graphs
-----------------------------------------------------------------



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

Date: Sun, 31 Jan 1999 16:08:09 GMT
From: Stoic <stoic@my-dejanews.com>
Subject: Freelance Work Postings?
Message-Id: <791v54$vp0$1@nnrp1.dejanews.com>

Hello,
 Would this forume be suitable for freelance work postings or would
 another list be more appropriate?  It's not geographically biased.

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


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

Date: Sun, 31 Jan 1999 12:52:23 GMT
From: el@fiz-karlsruhe.de (Edwin Litterst)
Subject: Re: HELP!!!   Using XS With C++
Message-Id: <36b44961.7599090@news>

>I have been trying to write a perl module which invokes functions in its C++
>counterpart object, based on the perlxs documentation.  I create a C++
>object in the perl module like,
>        $c_obj = MyClass::new("MyClass");        // this constructor
>initializes some data members in the C++ object
>
>and then invoke the C++ function like,
>        $c_obj->functionA();

Did you declare functionA as "extern int C"?

Eddie



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

Date: Sat, 30 Jan 1999 10:27:48 GMT
From: e_ron.no.spam@netvision.net.il (Ron)
Subject: How do I define and use typedef  in perl?
Message-Id: <36b2de9f.1713911@news.netvision.net.il>




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

Date: Fri, 29 Jan 1999 18:51:10 GMT
From: e_ron.no.spam@netvision.net.il (Ron)
Subject: How do I define and use typedef  in perl?
Message-Id: <36b296ec.979750@news.netvision.net.il>




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

Date: Sun, 31 Jan 1999 03:01:22 -0800
From: Abraham Grief <abey@hill.ucr.edu>
To: Pep Mico <pep_mico@hp.com>
Subject: Re: How to do query in a list?
Message-Id: <Pine.LNX.4.05.9901310250100.15713-100000@hill.ucr.edu>


On Sun, 31 Jan 1999, Pep Mico wrote:

> Hello,
> 
> I'd like to know what is the best way to ask if some string is included
> in a list. This is the case.
> 
> I have a list of 100 computers in a text file, and I want to check if
> the existence of a computer name on this list.
> 
> Actually I've loaded this list into an "array" and I'm looking each
> field of this array to check for the existence of one computer.
> 
> I want to find a better and efficient way to do this step.

Try loading the computer names into a hashtable instead of an array, using
the computer names as keys.  Then if you want to check if a computer
exists, just check for the existence of the appropriate hash key.



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

Date: Sun, 31 Jan 1999 03:16:00 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How to do query in a list?
Message-Id: <MPG.111ddb4b58a143969899e8@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <36B4170B.11567309@hp.com> on Sun, 31 Jan 1999 09:40:43 
+0100, Pep Mico <pep_mico@hp.com> says...
 ...
> I'd like to know what is the best way to ask if some string is included
> in a list...

This is a Frequently Asked Question.  See perlfaq4:  "How can I tell 
whether a list or array contains a certain element?"

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


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

Date: Sun, 31 Jan 1999 10:56:54 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: How to support both short and long option styles?
Message-Id: <791ctn$4oq$3@news.rz.uni-karlsruhe.de>

abigail@fnx.com (Abigail) wrote:
>Ronald J Kimball (rjk@linguist.dartmouth.edu) wrote on MCMLXXIX September
>MCMXCIII in <URL:news:1dmgosa.1y7w4lmw6rp1cN@bay1-358.quincy.ziplink.net>:
>{} Marc Haber <Marc.Haber-usenet@gmx.de> wrote:
>{} > I believe that I need to use both Getopt::Std and Getopt::Long since
>{} > Getopt::Std does not support "long" options and Getopt::Long does not
>{} > support aggregating "short" options.
>{} 
>{} You are mistaken.

Guilty of being a non-native speaker, yes.

>{} perldoc Getopt::Long
>{} 
>{}   ...Support for bundling of command line options, as was the case with
>{}   the more traditional single-letter approach, is provided but not
>{}   enabled by default...

Ouch, bundling. That's the word I have been looking for.

>Uhm, I tried. The documentation suggests setting "bundling_override".
>However, that leads to runtime errors in Getopt::Long.

Works for me now.

See:

|#!/usr/bin/perl -w
|
|use strict;
|use Getopt::Long;
|Getopt::Long::config('bundling');
|
|my $force = 0;
|my $stateFile = $STATEFILE;
|my $verbose = 0;
|my $debug = 0;
|
|GetOptions( "debug|d" => \$debug,
|            "verbose|v:i" => sub {
|                                    my ($dummy,$value)=@_;
|                                    $verbose += $value-1 if $value;
|                                    $verbose++;
|                                },
|            "force|f" => \$force,
|            "state|s=s" => \$stateFile ) or usage();
|
|print "\@ARGV: @ARGV\n";
|print "\$verbose == $verbose\n";
|print "\$force == $force\n";
|print "\$stateFile == $stateFile\n";
|print "\$debug == $debug\n";

This seems to work like a charm. Hints how to get rid of the local
variables in the code reference for verbose are appreciated, though.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29


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

Date: Sun, 31 Jan 1999 11:04:21 -0500
From: "Matthew Foley" <mfoley@richmond.net>
Subject: localtime()
Message-Id: <U7%s2.31$bL5.280@news3.ispnews.com>

Im not sure that my last string in :
($sec, $min, $hour, $mday, $mon, $year, $wday, $ydat, $isdst) =localtime();

is operating correctly. As I understand it $isdst should be eq 0 for
disabled and 1 for enabled.  However I have ran a script with locatime() and
done a print $isdst and  is always prints to 0.  I have switched the day
light saving time box on my nt workstation on and off, and I i still recieve
a 0.  Any clues??




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

Date: Sun, 31 Jan 1999 12:34:22 GMT
From: danny@dircon.co.uk
Subject: London, highly skilled perl programmer required
Message-Id: <36b44d82.17304141@news.dircon.co.uk>

A special job is available for you if you are a talented perl
programmer.

We need a senior Perl, CGI programmer to work as part of a highly
skilled team. You'll provide functionality to a high profile website.
Knowledge of  SQL and Linux a plus. A varied role in a lively young
company. The position is permanent - the salary is based on your
experience and how talented you are.

If you'e interested, please send your CV.

please Email danny@dircon.co.uk


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

Date: Sun, 31 Jan 1999 10:14:06 -0500
From: "George" <gpace@i-2000.com>
Subject: Looking for Sample Code - Listing Module
Message-Id: <791rvv$o8c$1@news2.i-2000.com>

I have been doing a lot of searching lately, looking the the Net and
Newsgroups, but I am looking for a place where there are some really good
Perl examples.  For instance, I see the descriptions of all of the commands,
but having a 3 or 4 line sample to go with it is invaluable.

For example, I am looking for some stuff that will pull down a directory
listing from a Unix Server (ie ls -l).  I was originally using the Net::FTP
library (which worked just fine), but I ran into some parsing problems.
When I posted that, someone told me to use the File::Listing module, but I
don't see how to connect the two.  Some sample code (along with the
description) really would have helped.






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

Date: Sun, 31 Jan 1999 16:12:11 GMT
From: rsarcomo@my-dejanews.com
Subject: Re: Multi Line Print
Message-Id: <791vcm$vsi$1@nnrp1.dejanews.com>

In article <VwDs2.170$L1.3223@nntp1.nac.net>,
  "Allan M. Due" <allan@due.net> wrote:
>     Are you sure that there is a new line after the final ENDING?  The lack of
> same is the most common reason I see for that error message.  On occasion I
> have suggested to folks to finish the statement with an extra ;  just to make
> sure that the newline is present.  So the code would look like:
>
> print <<ENDING;
> Hello
> World
> ENDING
> ;

This solved the problem.  Thank you very much.	It seems that emacs always
includes at least one newline when you create a new file whereas windows
notepad does not.

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


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

Date: Sun, 31 Jan 1999 02:28:20 -0800
From: Abraham Grief <abey@hill.ucr.edu>
To: Gary Smiley <gasmiley@mediaone.net>
Subject: Re: Newbie question
Message-Id: <Pine.LNX.4.05.9901310222230.15449-100000@hill.ucr.edu>


On Sun, 31 Jan 1999, Gary Smiley wrote:

> Thanks, but I don't think that's it. I stored my filename in a literal as
> $myfile = "\\\\computername\\shareddrivename\\directoryname\\filename".
> I found out the hard way that the backslash is an escape character so you
> need two of them for each backslash in your string.
> When it died I displayed the file name, which then appeared as:
> "\\computername\shareddrivename\directoryname\filename".
> The error was "invalid argument".
> I still don't know the answer.

Invalid argument?  Is this error message from a check on an open or is it
being generated by a call to the system function, or maybe even something
else?  Maybe posting some code would help, especially where it died...




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

Date: Sun, 31 Jan 1999 14:29:32 GMT
From: William B. <rblench@clover.net>
Subject: Re: NEWBIE: Premature end of script header
Message-Id: <791pc7$r5s$1@nnrp1.dejanews.com>

In article <36B3C427.9B018F2C@snailgem.org>,
  Eugene Sotirescu <eugene@snailgem.org> wrote:
> William B. wrote:
> >
> > I'm attempting to setup perlshop and am receiving the above error.  Can
anyone
> > tell me what it means and how to solve the problem?
>
> What's perlshop?
>
> --
> Eugene
>
> "Light is the all-exacting good,
> That dry, forever virile stream
> That wipes each thing to what it is,
> The whole, collage and stone, cleansed
> To its proper pastoral."
> 			Alvin Feinman
>

Perlshop is a free shopping cart script.
              William

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


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

Date: 31 Jan 1999 05:57:39 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: ok please don't shoot me for this question
Message-Id: <m1pv7vk0j0.fsf@halfdome.holdit.com>

>>>>> "Murali" == Murali Ravipudi <myparu@_usa_.net> writes:

Murali> How about putting up all the scripts made by people in clpm at
Murali> some site ( if the owner is willing to share it ) , so that we
Murali> can direct newbies there, where we know everything is mostly
Murali> perfect and all that...  :)

OK, <type type type> there... done!

Actually, it was done a long time ago.

It's called the CPAN.  There are dozens of mirrors all around the world.
Find your closest using the redirector at www.perl.com/CPAN/, or just
hop to www.cpan.org.

print "Just another Perl hacker,"

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Sun, 31 Jan 1999 10:53:35 -0400
From: Arved Sandstrom <Arved_37@chebucto.ns.ca>
Subject: Re: Perl Crashes IIS4!
Message-Id: <Pine.GSO.3.95.iB1.0.990131104556.4750C-100000@halifax.chebucto.ns.ca>

On Sun, 31 Jan 1999, Richard Walker wrote:

> Abigail wrote:
> > 
> > Richard Walker (Richard.Walker@west-server.com) wrote on MCMLXXVIII
> > September MCMXCIII in <URL:news:36B39BAF.60761156@west-server.com>:
> > **
> > ** Every time I run a PerlScript in ASP that uses IO::Sockets, it executes,
> > ** then promptly shuts my IIS4 server down.
> > 
> > Sounds like a bug in IIS to me.
> 
> Well, I seriously doubt that it is a _bug_, since IIS4 predates build
> 509 of ActivePerl.  At the same time I doubt that my build of perl has a
> bug.  
> 
> What I think is that there is a simple configuration issue which is
> undocumented.  This is usually the case with third party elements and
> IIS.  That is why I sent the information in the event log -- I was
> hoping that someone had seen this before and figured out the
> configuration that makes it go away.

And I think you're right, although it's hardly fair to say that
ActiveState Perl made your IIS break. ActiveState (I'm not a Windows fan,
but I can give credit where credit is due) have a pretty solid product
based on my own use of it.

Don't know about the "predating" part of your argument. Win95 predated
Win98 by 3 or 4 years, and Win98 fixed 3000+ bugs in Win95. So I wouldn't
go around touting the buglessness of IIS, particularly not when
practically every other server I've ever used on multiple platforms
handles Perl CGI nicely, thank you very much. :-)

ActiveState maintains a bunch of mailing lists, one or more of which
tackle problems like this one. I suggest you ask your question there, and
see what comes up. This is not a perl issue.

Arved

PS I just spent over a month with someone via email who was trying to get
IIS on NT to run Perl CGI. It's still not resolved (try diagnosing stuff
via email) but it's clearly not a Perl issue, as CGI's that ru on other
setips simply didn't on IIS. And I agree, I think it's all configuration.




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

Date: 31 Jan 1999 14:38:33 GMT
From: Alistair Cunningham <ac212@cam.ac.uk>
Subject: Proposed module: GTK_Dialog
Message-Id: <791pt9$apj$1@pegasus.csx.cam.ac.uk>


Dear All,
         As part of my degree project, I have to implement a dialog
entry system that reads data supplied by a user and enters it into an
SQL database. This must be scriptable - ie. users of my system must be
allowed to easily modify the form. It should run under X.

 The obvious solution is to use a general purpose dialog module. None
seem to exist for any X toolkit. Could anyone point me towards one?

 If, as I suspect, none exist, I intend to create one using GTK.pm
Details are not finalised yet, but I'd like to put in the following
features:


* Simple scripting syntax to create GTK widgets, and associate them
with elements of a hash array.

Something along the lines of (yes I know it's not quite correct Perl):



%myhash = GTK_Dialog(

  title=>'Test dialog',
  structure=>
        column(
                entry(  title=>'Phone number',
                        size=>20,
                        regexp=>'m/\d+/',
                        errorstring=>'Phone numbers may only be numerical'
                ),

                entry( title=>'Etc etc etc' )
        )
);

print $myhash{"Phone number"};



* When the user closes the dialog, a hash array of the entry boxes,
etc. is returned.

* Entries may be validated on a regexp or user supplied callback
function.

* Validation failure can be an error or a warning, on a per entry
basis.

* Users will be able to specify strings or text files that are
displayed when the user clicks on help, or when validation fails.

* Our application will require it to safe when used as setuid or
setgid, so this will uppermost in my mind. 

 In my project, I can then write a program using this module to get
user input, and write it to an SQL database.

Any thoughts? For example, I'd be interested in your opinions on object
oriented vs. procedural for this.


Alistair Cunningham.

-- 
--------------------------------------------------------------------------
 Alistair Cunningham   Selwyn College, Cambridge   Email: ac212@cam.ac.uk


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

Date: Sun, 31 Jan 1999 15:04:07 GMT
From: info@gadnet.com
Subject: Re: Sending email
Message-Id: <36b47035.162678740@news.newsguy.com>

>You generally should not use an array slice to access a single element.
>You should just get that element; $_[0].  Array slices are for when you
>want to a list of several elements all at once.

I see what you mean. I'll change that.

>By the way, in an earlier message you wrote:
>> Then the script is supposed to send some HTML to the browser but it
>> returns the same server error message instead.
>
>But you never told us what the error message is......

Here it is:

Server Error... 

Something went wrong somewhere. It is most likely a code problem or if
you used a form that required an e-mail address it is
possible the e-mail address is incorrect.

Not very helpful. If you want to see the error in action you can go to
http://www.gadnet.com/cgi-bin/bpemail.cgi

Enter 'gadnet' as the password. Then click on 'All Members' and then
on 'Send Email'.

Thanks,

Drummond Miles


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

Date: Sun, 31 Jan 1999 11:05:02 -0500
From: "E. Preble" <preble@ipass.net>
Subject: Re: sending mail attachment from script
Message-Id: <Lc%s2.751$24.2299@news.ipass.net>

>can I send a mail with attachment (gzip file) from a script ?
>The mailer is "exim".  If possible I would like to do it without
additional modules

Although you asked for the exim mailer, and no modules, I thought
I would post this anyway, in case you get no other solutions:

There is a free script (PERL) at
http://www.datatrendsoftware.com/cgi.html

called Automail Lite that can send attachments using sendmail and
requires MIME::TOOLS. The script is form based, but could easily
be adapted to sending without form input.

HTH

E. Preble




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

Date: Sun, 31 Jan 1999 14:38:18 GMT
From: cim@online.ee (Cim)
Subject: simple database
Message-Id: <36b5690f.15966752@news.online.ee>

So,
I have a simple database:
item1: $type|$description|$name|$email
item2: $type|$description|$name|$email
etc.
this is all in a file.

I need to manipulate this database. Would hashes be the best in this
case. If yes, then how would i use them.

problem1:
i need to sort items by $type and then $description. (there are only a
few types at $type ).

problem2:
need to search the database and then print an item if $name eq
$namegiven & $email eq $emailgiven, and if nothing is found print
"Sorry" or something like that.


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

Date: Sun, 31 Jan 99 10:59:32 GMT
From: des@d-lab.demon.co.uk ("D.Taylor")
Subject: Re: Visual Perl?
Message-Id: <917780372snz@d-lab.demon.co.uk>

In article <791812$7gt$1@samsara0.mindspring.com>
           tszeto@mindspring.com "Ted" writes:

> Just found this site with a free WinPerl IDE. It's very good.
> http://homepage.dave-world.net/~pete/index.html
> 
> The programmer used to work at ActiveState.
> 
> 
> 
> Dieter M|cke wrote in message <36B17B8D.6DBE54B9@wueba.de>...
> >Hi Gil,
> >Perl has many graphical frontends.
> >Under Win32 there is a lot of non-free IDE's.
> >Or use (X)Emacs on Win32 or Unix as IDE, DDD or ptkdb as debugger.
> >For Application use Perl/Tk, Perl/Qt or Perl/X.
> >
> >Regards
> >--
> >Dieter M|cke                         e-mail: Dieter.Muecke@wueba.de
> >                                     www:    http://www.wueba.de
> >,,,^..^,,,
> 
> 
> 
   Does anybody out there kow if there is a visual perl for the mac?
   regards des.. 
   -----------------------------
   http://www.d-lab.demon.co.uk
   -----------------------------



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

Date: 31 Jan 1999 05:55:24 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Yahoo, proxys and perl
Message-Id: <m1socrk0mr.fsf@halfdome.holdit.com>

>>>>> "me" == me  <msquire@ktb.net> writes:

me> I really hope this is not off topic, but I have had this situation
me> nagging me for a while now.  I wrote  proxy server.

Is it a true proxy server that handles "GET http://foo.yahoo.com/"
through HTTP, or a CGI-like proxy server that fetches that
http://your.host.com/cgi/proxy/http://foo.yahoo.com/ for you,
rewriting the URLs on the way back?

I've written both kinds for my columns for WebTechniques (see
<URL:http://www.stonehenge.com/merlyn/WebTechniques/>.  The first
(true) proxy requires setting up each browser that uses it.

me>   It works fine, and
me> I have had very few problems.  I noticed though, that when I try to
me> access yahoo through the proxy, yahoo somehow completely circumvents the
me> proxy and sends html and data directly to my machine instead of to the
me> proxy first.

Well, if it's the first kind, it shouldn't do that, unless your
browser has exceptions in its proxy list.  If it's the CGI kind, then
you have to be VERY careful to rewrite *all* URLs that come back from
the data so that they point at your CGI script instead of the
originator.  The one I forget on the initial design of the CGI-based
proxy was external redirects... when the server sends back:

	Location: http://bar.yahoo.com/here/it/really/is/

in the HTTP response header.  If you let that go through withou
rewriting it, you'll have lost the flow.

me> I know this because I forced the proxy to create a log of all the data
me> that passes through it (temporarily).  There was absolutely NO data from
me> Yahoo that went to the proxy first.  It is like Yahoo knew that I was
me> using a proxy and circumvented it somehow.  Does anyone please have an
me> explanation?

Like others have said, there's nothing Yahoo is doing that's unusual, but
you might have some coding errors.

(I'd be personally interested in seeing your code, if you don't mind.)

print "Just another Perl hacker and web whacker,"

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

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

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