[10927] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4528 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 1 16:07:21 1999

Date: Fri, 1 Jan 99 13:00:17 -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           Fri, 1 Jan 1999     Volume: 8 Number: 4528

Today's topics:
    Re: "Malform Multipart Post" <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: a nicer way? <eugene@verticalnet.com>
    Re: Basic Perl DOS/Win95 + WWW + CGI course for Newbies (Simon Whitaker)
        Converting globs to regexes (was: wildcard) <rra@stanford.edu>
        Crypt() <webmaster@somewhere.com>
    Re: Crypt() <ljz@asfast.com>
    Re: Crypt() (Groovy94)
        Drawing names for Christmas with perl <lynn@swcp.com>
        Filelisting of Dir & Subdir <philip.class@popcorn-studio.ch>
        How does scope play in require? <design@spam_raincloud-studios.com>
        How to call a c++ method from PERL ? <blackk@dial.oleane.com>
    Re: looking for perl programmer <burt.adsit@gte.net>
    Re: looking for perl programmer <design@spam_raincloud-studios.com>
    Re: Need Help: Beginners to Perl <jeff@webdesigns1.com>
        New to perl dbeallie@cyberus.ca
    Re: New to perl <dgris@moiraine.dimensional.com>
    Re: New to perl <uri@home.sysarch.com>
    Re: New to perl <dgris@moiraine.dimensional.com>
    Re: News scripts (Spawn)
        ODBC (peter)
    Re: Perl, Netscape and Internet Explorer...:( <Mukke@get2net.dk>
    Re: Scripts (Clay Irving)
        Splitting Input File W/$INPUT_RECORD_SELECTOR (UMD Vikram)
        staircase effect <lonehacker@hotmail.com>
    Re: STUPID PERL QUESTION... maybe (Jeffrey Drumm)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 01 Jan 1999 19:55:33 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: "Malform Multipart Post"
Message-Id: <83vhiqrffe.fsf@vcpc.univie.ac.at>

Re: "Malform Multipart Post", tavi <tavi367@ibm.net>
said:

tavi> I created a script on NT p5 iis4.  It seems to
tavi> work fine but I get this error every 6 to 8
tavi> uploads.
tavi> Even if the file is the same or different.
tavi> I used CGI.pm in my script.
tavi> Any ideas?

Provide some information that would help to identify
the problem?

tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien,  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: Fri, 01 Jan 1999 10:16:24 -0500
From: Eugene Sotirescu <eugene@verticalnet.com>
To: tavi <tavi@earthling.net>
Subject: Re: a nicer way?
Message-Id: <368CE6C8.5EA60377@verticalnet.com>

Good luck doing multipart forms with cgi-lib.pl . . .

tavi wrote:

> Scratchie wrote in message ...
> >
> >Tom Christiansen <tchrist@mox.perl.com> wrote:
> >: :You might want to clue Lincoln Stein in on this.  In my copy of the
> >: :man page to CGI.pm (obviously, gen'd from the embedded pod), all of
> >: :his examples use the OO syntax.
> >
> >: This is what we call an historical artifact -- he wrote the documentation
> >: before he had introduced the procedural interface.   He merely never
> >: bothered to rewrite it.  I hereby volunteer to amend the documentation
> >: to mirror its more customary and normal use.
> >
> >That would be a great service to newbies... the existing CGI docs are a
> >little intimidating if you've never done any OO programming before.
> >
> >--Art
>
> I agree. I even bought the book and that didn't really help me (maybe I'm a
> bit thick).
>
> I just can't figure out why I keep getting "malformed multipart posts"
> errors.
>
> But then again, I'm following the Docs and using OOP format.
>
> Maybe after I get a copy of Toms revised Docs on CGI.pm, I will get a better
> handle on this and solve my problem.
>
> But then again, there is always cgi-lib.pl
>
> Walter



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

Date: Fri, 01 Jan 1999 19:59:03 GMT
From: spam@netcetera.org (Simon Whitaker)
Subject: Re: Basic Perl DOS/Win95 + WWW + CGI course for Newbies , Christmas free offer .
Message-Id: <368d28e9.12122688@news.u-net.com>

On Fri, 1 Jan 1999 00:36:54 -0600, tavi wrote:

> Expert wrote in message <36817006.E6F@friko.onet.pl>...
> >I would like to give basic Perl course for newbies.
> >Integration of CGI Perl scripts with WWW pages.
> >Setting up simple WIN95/ web server and setting up web pages + CGI
> >programs running on your PC , for testing purposes.

Count me in for the Win95 web server bit.

All the best,

Simon

-- 
Simon Whitaker, Perl novice (so be gentle with me), my first
language since ZX Spectrum BASIC. Damn I miss that K prompt.
s/spam/simon/ if replying by mail # http://www.netcetera.org


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

Date: 31 Dec 1998 22:38:18 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Converting globs to regexes (was: wildcard)
Message-Id: <ylww37o5ut.fsf_-_@windlord.stanford.edu>

Tom Christiansen <tchrist@mox.perl.com> writes:

> From PCB, chapter 6:

>     sub glob2pat {
>         my $globstr = shift;
>         my %patmap = (
>             '*' => '.*',
>             '?' => '.',
>             '[' => '[',
>             ']' => ']',
>         );
>         $globstr =~ s{(.)} { $patmap{$1} || "\Q$1" }ge;
>         return '^' . $globstr . '$';
>     }

I wrote this for the MJ2 project a while back, and although it isn't very
well tested, I keep meaning to wrap a module around it.  This has the
advantage over your solution that it correctly handles {..,..} csh-style
expressions, handles [^]*] correctly, and handles escapes.

# WARNING: Untested code.
{ 
    my ($escape, $or, $class);
    sub convert {
        local $_ = shift;
        if ($escape)       { $escape = 0; return '\\' . $_    }
        elsif ($_ eq '\\') { $escape = 1; return ''           }
        elsif ($_ eq ']')  { $class--; return $_              }
        elsif ($class = 2) { $class-- if $_ ne '^'; return $_ }
        elsif ($class)     { return $_                        }
        elsif ($_ eq '[')  { $class = 2; return $_            }
        elsif ($_ eq '*')  { return '.*'                      }
        elsif ($_ eq '?')  { return '.'                       }
        elsif ($_ eq '{')  { $or = 1; return '('              }
        elsif ($_ eq '}')  { $or = 0; return ')'              }
        elsif ($_ eq ',')  { return $or ? '|' : $_            }
        else               { return quotemeta $_              }
    }
}
$regex = join ('', map { convert $_ } split (//, $glob));

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Fri, 1 Jan 1999 12:02:01 -0500
From: "Webmaster" <webmaster@somewhere.com>
Subject: Crypt()
Message-Id: <76iuvt$8eo$1@nd.eastky.net>

I think I have a grasp on crypt as a simple password method to scramble
passwords...

But what is the de-crypt method?  Am I being really blind and not seeing it?
Appreciate any help.

</mgeier>
</mikeg@eastky.net>





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

Date: 01 Jan 1999 12:37:49 -0500
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: Crypt()
Message-Id: <lt67aqlwr6.fsf@asfast.com>

"Webmaster" <webmaster@somewhere.com> writes:

> I think I have a grasp on crypt as a simple password method to scramble
> passwords...
> 
> But what is the de-crypt method?  Am I being really blind and not seeing it?
> Appreciate any help.

The `crypt' function is a Unix function which was originally designed
to encrypt so that there is no deterministic way to decrypt.  Perl just
provides an interface to this Unix function, if it exists on your
system.

The way Unix validates a password is to take the password that you
enter interactively and to then run it through `crypt'.  The encrypted
result is compared to the encrypted result which had been previously
stored in /etc/passwd or elsewhere.  In other words, no decryption is
done in Unix to validate passwords.  You can do this or something
similar via Perl using its `crypt' function, if you desire.

If you want to do encryption in such a way that the corresponding
decryption can be performed deterministically, you would need to
use some sort of mechanism other than `crypt'.

-- 
 Lloyd Zusman   ljz@asfast.com
 perl -le '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
 $t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
 $x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x"'


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

Date: 1 Jan 1999 17:54:49 GMT
From: groovy94@aol.com (Groovy94)
Subject: Re: Crypt()
Message-Id: <19990101125449.11156.00005107@ng100.aol.com>

The way I have always checked a submitted password against the already crypted
one is to  crypt the input one and then do an "unless" statement. Example:

$cypted_pass=crypt($INPUT{password}, aa);

unless ($crypted_pass eq $real_pass) {
       do something
}
Regards,
Gil Hildebrand, Jr.
Dynamic Scripts

Email: groovy94@aol.com
ICQ UIN: 16678754


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

Date: Fri, 01 Jan 1999 11:19:13 -0700
From: Lynn Wilson <lynn@swcp.com>
Subject: Drawing names for Christmas with perl
Message-Id: <368D11A1.2011A9BC@swcp.com>

Does your family draw names for Christmas?  Are you stuck with
coming up with a list year after year and trying to insure that
certain individuals don't draw certain names?  Here's a short perl
script that I wrote that did the job for me.  I actually ran it
dozens of times and copied the results to a bigger files that can
be used for the next 15 years.  I did, however, inspect them to
insure that my rich uncle always drew my name :-)

Enjoy.
Lynn

--------------------------- cut here
----------------------------------
#!/usr/local/bin/perl -w

#################################################################
# A simple Perl script to generate family Christmas draw lists. #
#                                                               #
# Written by Lynn Wilson (lynn@swcp.com) October 1998           #
# Placed into the public domain Jan. 1999                       #
#################################################################

use strict;

# Assignment rule:  Nobody can draw a name with the same marriage
code 
# This prevents drawing names of your own spouse or adult childern,
etc.
# This also prevents drawing yourself... :-)
# All names must be unique, so use a full name or nickname if
required.


my %Marriages =
(
    'Gail'      =>  1,
    'Jim'       =>  1,
    'Lynn'      =>  2,
    'Vicki'     =>  2,
    'Matt'      =>  3,
    'Susan'     =>  3,
    'Lewis'     =>  4,
    'Kathy'     =>  4,
    'Jenny'     =>  4,
    'Dan'       =>  2,
    'Marcea'    =>  2,
    'David'     =>  2,
    'Carla'     =>  2,
);


srand;                          # seed the random number generator

my @Names = keys %Marriages;    # generate array of names
my $NumPeople = @Names;         # get how many people are in the
list

my ($person, $marriage, $friend);

SAMPLE:
while(1)
{
        my %Working = %Marriages;   # copy the original table to
working table
        undef my %outlist;          # empty the output list

        PERSON:
        while( ($person, $marriage) = each %Marriages )
        {
            # try and find an unassigned friend for this person
            foreach  ( 1 .. 1000 )
            {
                    my $who = $Names[rand($NumPeople)];
                    next if( $marriage == $Working{$who} );
                    next if( $Working{$who} == 0 );

                    $outlist{$person} = $who;
                    $Working{$who} = 0;
                    next PERSON;
            }
            next SAMPLE;    # give up on this attempt, try another
        }

        print "\n\n\n\n\n";
        while( ($person, $friend) = each %outlist )
        {
                print "$person \t-> $friend\n";
        }
        print "\n";
        last;
}

# end of perl script


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

Date: Fri, 1 Jan 1999 19:00:36 +0100
From: "Philip Class" <philip.class@popcorn-studio.ch>
Subject: Filelisting of Dir & Subdir
Message-Id: <76j2ie$ojq$1@bw107zhb.bluewin.ch>

Could someone please show me an example of how to have listed all files of a
directory & its subdirectories (to push them lateron into an array) ?

I've tried the find::file , file::Listing and have read the perldoc -f
opendir & readdir .... but I simply don't manage to succeed.
The only input needed is a physical root-directory like 'c:\data\' .

Thanks,

Philip


PS: With the attached code I've managed so far to get a list of dir's and
files of only 1 directory

  my $dir = $_;
  print "Traversing directory $dir...\n";
  @files = <$dir\\*>;
  foreach $file (@files) {
 $i=$i+1;
 print "Counter is: $i$file \n";
  }




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

Date: 1 Jan 1999 20:50:20 GMT
From: "Charles R. Thompson" <design@spam_raincloud-studios.com>
Subject: How does scope play in require?
Message-Id: <76jcec$t5@bgtnsc03.worldnet.att.net>

I've been cracking all the little animal books here and can't seem to find
discussion on require and scope. I understand that you can load libraries as
well.. 'required' during run time, but how / when are they released? With
pseudo code examples like this..

sub mysub1
{
require "mylib.pl";
do something with it here...
}

sub mysub1
{
  if something = something{
  require "mylib.pl";
  do something with it here...
  }
  do new stuff
}

does the library get unloaded within each block? I only want to load the
library as needed and ensure it is 'released' after any calls to it are
complete. Is there something like 'unrequire' in Perl or is this
automatically handled much like my variables?

CT




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

Date: Fri, 1 Jan 1999 21:24:38 +0100
From: "Black K" <blackk@dial.oleane.com>
Subject: How to call a c++ method from PERL ?
Message-Id: <76jb26$2o4$1@minus.oleane.net>

Hye.

I am a newbie in PERL.

The issue:
I have a .a and a .h file in c++. I would like to call from PERL a c++
method with input parameters and result parameters.


Could anyone tell me how to perform this without too much work around ?

I have heard about PERLXS. Is this enough and reliable in any case ?

Thanks for your help.

Best regards,

Kevin Black




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

Date: 1 Jan 1999 20:11:10 GMT
From: Burt Adsit <burt.adsit@gte.net>
Subject: Re: looking for perl programmer
Message-Id: <76ja4u$r3o$0@205.138.137.53>

Sorry to burst your bubble but anyone who is an 'intermediate-expert' in
perl doesn't need free hosting ($20/mo). They really don't need 'front
page support'. 'possable money' would be a good thing. Expect to pay
$50-$150/hr. Depends on how annoying you are.

Parplex wrote:
> 
> i am looking for an intermediate-expert perl programmer to do some programming
> for my Co. in return you get 20 megs, cgi-bin, front page support, and much
> more..possable money depending on how good. Email parplex@aol.com.
> HURRY

-- 
Burt Adsit
Earthenware
http://www.featurefarm.com
lat n43.10' lon w86.2'


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

Date: 1 Jan 1999 20:43:39 GMT
From: "Charles R. Thompson" <design@spam_raincloud-studios.com>
Subject: Re: looking for perl programmer
Message-Id: <76jc1r$obg@bgtnsc03.worldnet.att.net>

Burt Adsit wrote in message <76ja4u$r3o$0@205.138.137.53>...
>Sorry to burst your bubble but anyone who is an 'intermediate-expert' in
>perl doesn't need free hosting ($20/mo). They really don't need 'front
>page support'. 'possable money' would be a good thing. Expect to pay
>$50-$150/hr. Depends on how annoying you are.

(crackin up)

I was just thinking of rewriting the rates section of my business package.
Does this this paragraph have the standard GNU General Public License on it?
It certainly could help narrow down my market scope. ;)

CT






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

Date: Fri, 1 Jan 1999 09:53:07 -0600
From: "Jeff Oien" <jeff@webdesigns1.com>
Subject: Re: Need Help: Beginners to Perl
Message-Id: <76iqqn$241$1@birch.prod.itd.earthlink.net>

Iskandar D wrote in message <368b6d90.9322759@news.singnet.com.sg>...
>hi there,
>             i'm keen to lean PERL.  the thing is that where do i
>start and how?

I have a site which may be of some help:
http://www.webdesigns1.com/perl/
--
Jeff Oien, WebDesigns
http://www.webdesigns1.com/
jeff@webdesigns1.com






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

Date: Fri, 01 Jan 1999 16:39:11 GMT
From: dbeallie@cyberus.ca
Subject: New to perl
Message-Id: <368cf993.5316244@news.cyberus.ca>

What are the top 10 (or more) features of perl? 



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

Date: 01 Jan 1999 10:56:30 -0700
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: New to perl
Message-Id: <m367aqj2r5.fsf@moiraine.dimensional.com>

dbeallie@cyberus.ca writes:

> What are the top 10 (or more) features of perl? 

Regular expressions
Portability
Regular expressions
Rapid development
Regular expressions
CPAN
Regular expressions
Excellent documentation
Regular expressions
Open source
Regular expressions
TMTOWTDI
Regular expressions

dgris
- did i mention regular expressions? :-)
-- 
Daniel Grisinger          dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print 
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'


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

Date: 01 Jan 1999 13:51:53 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: New to perl
Message-Id: <x7btkig71y.fsf@home.sysarch.com>

>>>>> "DG" == Daniel Grisinger <dgris@moiraine.dimensional.com> writes:

  DG> dbeallie@cyberus.ca writes:
  >> What are the top 10 (or more) features of perl? 

  DG> Regular expressions
  DG> Portability
  DG> Regular expressions
  DG> Rapid development
  DG> Regular expressions
  DG> CPAN
  DG> Regular expressions
  DG> Excellent documentation
  DG> Regular expressions
  DG> Open source
  DG> Regular expressions
  DG> TMTOWTDI
  DG> Regular expressions

  DG> dgris
  DG> - did i mention regular expressions? :-)

you forgot regular expressions.

and this friendly and loving newsgroup.

it's free (covered by open source).

and you forgot the best regular expressions in the business.

and it's fun.

uri


-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: 01 Jan 1999 12:53:11 -0700
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: New to perl
Message-Id: <m31zleixco.fsf@moiraine.dimensional.com>

Uri Guttman <uri@home.sysarch.com> writes:

> you forgot regular expressions.

Damn, I knew there was something. :-)

> and this friendly and loving newsgroup.

Folks, you heard it here- clpm stands for comp.love.perl.misc.

> and it's fun.

Actually, this one I did forget, and it is certainly as important
as any of the others.  

A friend used to badger me constantly about using perl instead of c.
He couldn't understand why I'd give up the speed of c.  But there's
more to what we do than speed.

I want something that I'm going to spend 15-20 hours a day staring at
to be more than a list of operations.  I want it to be more like a
song or a poem, something that clicks in my brain and makes my eyes
open in astonishment.  Something that I smile about while I write it.
That's easier to do in perl than in any other language I've ever used.

As wonderful as it is to have a piece of code that screams I would
much rather have one that sings.  That's why I use perl.

dgris
-- 
Daniel Grisinger          dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print 
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'


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

Date: Fri, 1 Jan 1999 08:37:36 -0800
From: spawn90@my-dejanews.com (Spawn)
Subject: Re: News scripts
Message-Id: <MPG.10f699aea68516cd989683@news.slip.net>

In article <76i0h7$e41$1@news.NERO.NET>, stanley@skyking.OCE.ORST.EDU 
says...
> In article <MPG.10f5cb251407b257989682@news.slip.net>,
> Spawn <spawn90@my-dejanews.com> wrote:
> >Can anybody tell me a decent CGI news script that is highly customizable 
> >and works really well? 
> 
> Do you want CGI or news? CGI is HTTP, news is NNTP, and although the
> acronyms look alike, they are very different. Many web clients will do
> NNTP all by themselves.

I looking for cgi where I can post news articles on my homepage. Do you 
have the url for cgi,http, nntp? 


Thanks

-- 
UFO Phenomena Page
http://www.csoft.net/~cage


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

Date: Fri, 01 Jan 1999 20:28:53 GMT
From: pdroogma@netscape.net (peter)
Subject: ODBC
Message-Id: <368d2e7b.1098810@news.pandora.be>

Hello,

I have a database with pictures in it and I want to use a perl script
to insert, update and delete those pictures. I access the database
using win32::ODBC. The database is an ms access db and the picture
field is an OLE object or BLOB.

I got this far :

I can extract pictures and display them without a problem, but I can't
insert a picture to the database. The strange part is that if I modify
the field type to memo I can succesfully insert the picture but can't
extract it anymore using a script, but if I change the field type back
to OLE/BLOB I can extract the inserted picture without a problem.

Since I can't do this stuff while the database is online I need to
choose between Memo type or OLE/BLOB type.

Anybody any ideas or does anybody knows an other method. The only
thing is that the pictures have to be in the database (not a reference
in tha database pointing to a file)

Thanks,
Peter
pdroogma@netscape.net



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

Date: Fri, 1 Jan 1999 19:22:52 +0100
From: "Thomas Turn Jensen" <Mukke@get2net.dk>
Subject: Re: Perl, Netscape and Internet Explorer...:(
Message-Id: <bw8j2.228$k26.572@news.get2net.dk>

How come it should be a server problem when it works fine with some (in this
case IE) clients? I recon that it is the file extension - probably .cgi or
 .pl - that the client (Netscape (sucks)) don't know what to do with(?)

***
Thomas Turn Jensen
Icq uin => 8128636
IRC, Undernet => Mukke
***
So long, and thanks for all the fish
***


John Stanley skrev i meddelelsen <76e020$358$1@news.NERO.NET>...
>In article <76d0hg$19t$1@linus.sni.de>, Tojo <Tojo.Punnoose@Blr.Sni.De>
wrote:
>>Hi,
>>I am using Microsoft Peer Web Server on my machine.
>>
>>Someone Please help me......
>
>I suggest one of the many microsoft.* newsgroups, preferrably one that
>deals with their web server.
>




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

Date: 1 Jan 1999 10:30:27 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Scripts
Message-Id: <76ipmj$n0m@panix.com>

In <368cc4f9.0@glitch.nildram.co.uk> "Tony" <tspencer@exconet.co.uk> writes:

>Does anyone know where I can download Perl scripts of different games.
>I want to put up a web site comprising of different games all run by Perl
>scripts.

The 'games' section of Perl Reference:

    http://reference.perl.com/query.cgi?games

If I'm missing any, please let me know.

-- 
Clay Irving
clay@panix.com


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

Date: 1 Jan 1999 17:26:59 GMT
From: umdvikram@aol.com (UMD Vikram)
Subject: Splitting Input File W/$INPUT_RECORD_SELECTOR
Message-Id: <19990101122659.01068.00004341@ng-cd1.aol.com>

Someone helped me by pointing out that to split an input file with three
different files merged together (split by a line like ******) could be done
using $INPUT_RECORD_SELECTOR.

I used split(), but that failed badly. So someone told me about this, but I
cannot findany reference or code samples to see how to use these method.  I was
hoping someone could give me an example or maybe a website.

Ex input file
Deniro|jpg|150|100
Pacino|jpg|150|100
*******
Sound|wav
Sound2|wav
*******
Movie     Heat
Dir      Michael Mann

Notice how three database  txt files are merged together.  Now I just want to
split them at the ***** and then I can split then further from there.

Any help is great, Happy New Year,
Vikram Pant


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

Date: 1 Jan 1999 19:33:36 GMT
From: "PAUL SUTTON" <lonehacker@hotmail.com>
Subject: staircase effect
Message-Id: <01be35bd$7e3ef9a0$f8c322c3@default>

Hi, I am looking for a script to stop the staircase effect under RHLinux
5.2, Using A cannon BJC250. I have two but neither seem to work, or the one
in the printing how to causes a compile error when executing

perl filter.pl or perl filter depending on how I name it

Thanks in advance for any help, 

Paul Sutton
<lonehacker@hotmail.com>


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

Date: Fri, 01 Jan 1999 18:15:12 GMT
From: drummj@mail.mmc.org (Jeffrey Drumm)
Subject: Re: STUPID PERL QUESTION... maybe
Message-Id: <368cfcea.97156353@news.mmc.org>

On Wed, 30 Dec 1998 01:53:25 GMT, dilcher@cueva.dontspam.com (Jeff) wrote:

>Subject: STUPID PERL QUESTION... maybe

A more descriptive subject line would be appreciated in future posts.

>I am not really a programmer, but write silly little perl scripts
>to help me do some tasks on my Windows machine.

If you write programs, you're a programmer. Perhaps not a *good*
programmer, but a programmer nonetheless . . . :-)

>I am trying to write a program that needs user input, and,
>I would like the abiltiy to paste windows clipboard data as
>that input.  Unfortunately, this is not easy/possible with the
>standard "dos window" interface.

>Is there something like a tiny windows program that I could
>run, via my script, that would present a windows fill out form
>box, then would pass the pasted data back to my script?

>I am trying to think of the easiest solution, rather than have
>to fool with learning about some toolkit, if possible.

>Any help appreciated!
>Please remove dontspam when replying,

If you'd like an email reply, please remove it yourself.

Some possibilities:

1. Check out Win32::Clipboard. This will allow you to fetch, modify, and
update the contents of the clipboard via a Perl script. It's available at
ActiveState's site, and can be installed in about 30 seconds if you've got
a current release of ActivePerl with ppm. See http://www.activestate.com.

2. Look into Perl/Tk. Seriously. It's not that hard . . . I had no previous
Tk/GUI development experience, but built the bulk of a little rolodex-type
application in Perl within a couple of hours, including the time spent
noodling around trying to figure out how things worked in Tk. It doesn't
come bundled with ActivePerl 5.005, but ppm installs it painlessly.

Creating a dialog box that prompts for input is as simple as:

#!perl -w

# tkaddr - displays simple address form

use Tk;
use strict;

# create the root window
my $main = MainWindow->new(-title => 'My App');
my (%frame,%entry);

# build the form; frames used simply to make things line up better without
# having to deal with a geometry manager more complicated than pack
foreach my $elem (qw/Name Addr City State Zip/)
{
    $frame{$elem} = $main->Frame()->pack(-anchor => 'nw');
    $frame{$elem}->Label(-text => "$elem:", 
			 -width => 10,
			 -anchor => 'ne')->pack(-side => 'left');
    $entry{$elem} = $frame{$elem}->Entry(-width => 30);
    $entry{$elem}->pack(-side => 'left');
}

# 'Submit' button executes &submitter perl sub; 'Continue' button destroys 
# main window and terminates &MainLoop, allowing script to continue
$main->Button(-text => 'Submit',
	      -command => \&submitter)->pack(-side => 'left');
$main->Button(-text => 'Continue',
	      -command => [ $main => 'destroy' ] )->pack(-side => 'right');

# place the focus on the first entry field
$entry{Name}->focus;

sub submitter
{
    # here we simply print out the values fetched from the form fields,
    # preceded by field name and colon. You'd probably do something
    # different :-)

    foreach my $key (qw/Name Addr City State Zip/)
    {
	print $key,':',$entry{$key}->get,"\n";
    }
}

&MainLoop;  # exported from Tk - displays the form and waits for action

# continue processing down here after done with form

__END__

Hope this helps!

-- 
                           Jeffrey R. Drumm, Systems Integration Specialist
                                  Maine Medical Center Information Services
                                     420 Cumberland Ave, Portland, ME 04101
                                                        drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented." -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 4528
**************************************

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