[16931] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4343 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 16 21:05:29 2000

Date: Sat, 16 Sep 2000 18:05:11 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <969152710-v9-i4343@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sat, 16 Sep 2000     Volume: 9 Number: 4343

Today's topics:
    Re: a pesky regex -- any ideas? (Alan Barclay)
        ANNOUNCE: Term::Getch v0.20 <jdb@wcoil.com>
    Re: binmode(): How is OS related with "\n"? (Tim Hammerquist)
    Re: Copying Files <indy@remove_this_indigostar.com>
        help with HTML::Parser please ptomsic@my-deja.com
    Re: help with HTML::Parser please <godzilla@stomp.stomp.tokyo>
    Re: help with HTML::Parser please (brian d foy)
    Re: help with HTML::Parser please <flavell@mail.cern.ch>
    Re: help with HTML::Parser please ptomsic@my-deja.com
    Re: How can I do this ? (Clay Irving)
    Re: How can I do this ? <ren.maddox@tivoli.com>
    Re: how do I alphabetize this? <yanick@babyl.sympatico.ca>
    Re: how do I alphabetize this? <godzilla@stomp.stomp.tokyo>
    Re: Is there a file rename function? (Tom Christiansen)
        Just curious.. <halo_five@my-deja.com>
        Load graphic from form data tayloremail@netscapeonline.co.uk
    Re: lynx shows html-tags <pilsl@goldfisch.atat.at>
    Re: lynx shows html-tags (Abigail)
    Re: perlxs - finding the class name (Daniel Chetlin)
    Re: Qualifications for new Perl programmer????? <bcaligari@my-deja.com>
        Re encrypting a string <19wlr@globalnet.co.uk>
    Re: Re encrypting a string (Mike Stok)
    Re: Re encrypting a string (Abigail)
    Re: Re encrypting a string <bwalton@rochester.rr.com>
        Recipe For Sorting LoL andre_sanchez@my-deja.com
    Re: Recipe For Sorting LoL (Gwyn Judd)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 16 Sep 2000 23:59:57 GMT
From: gorilla@elaine.furryape.com (Alan Barclay)
Subject: Re: a pesky regex -- any ideas?
Message-Id: <969148790.620387@elaine.furryape.com>

In article <39C23D8D.ABA70051@pobox.com>,
Richard Dice  <rdice@pobox.com> wrote:
>I've tried a bunch of variation on:
>
>    $header =~ /\nTo: (.+)\n\S/s && do { $to = $1; };
>
>but apparently I haven't tried the right one yet.

In addition to all the helpful responses on your exact problem, you should
be aware that it's legal to have multiple To: headers. Your code should
consider this, and handle it in an appropriate way.

Alternativly, you could use the Mail::Header module, which already does
consider this, and other issues.


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

Date: 16 Sep 2000 02:33:07 GMT
From: "Josiah Bryan" <jdb@wcoil.com>
Subject: ANNOUNCE: Term::Getch v0.20
Message-Id: <ss82mbu9h3t154@corp.supernews.com>

Greets Perlfolk,

Announcing the release of:
    Term::Getch v0.20


Recomended download URL:
    http://www.josiah.countystart.com/modules/get.pl?getch:announce


This file has also entered CPAN as:

  file: $CPAN/authors/id/J/JB/JBRYAN/Term-Getch-0.20.zip
  size: 2862 bytes
   md5: cec17837772afa2f943669025fd030cd

==================================================================

NAME

Term::Getch - A simple alternate ReadKey()-like interface for MSWin32

==================================================================

SYNOPSIS

 use Term::Getch;

 while(1) {
  my $c = getch();
   print "Input: $c\r";
 }

==================================================================

DESCRIPTION

This module is for all those Win32 users who can't get Term::ReadKey to work
with ActiveState's Perl. I don't know if anybody else can, or can't get it
to
work, but I know I had a heck of a time today trying to get Term::ReadKey to
work. So, finally, out of desperation, I hacked out this small attempt at
a portable solution to the delima. Behold, Term::Getch;

This exports a single function, getch(). Optional export is ascii(), which
returns the ASCII character code of any character passed. (getch() returns
the ASCII character as given by chr()).

getch() requires Win32::Console to be installed *_IF_* you are a MSWin32
user.
If you are not a MSWin32 user, then it will default to Term::ReadKey in an
eval() statement.

getch() is a non-blocking read call. If there are no characters waiting, it
returns
undef. Otherwise, it returns the ASCII character (on key up.)

=> NOTE

Note: This has only been tested on by the author with ActiveState on Windows
98. I'm not sure
how well this preforms on other systems. If this doesn't work on your system
and you
aren't a MS Windows user, go download Term::ReadKey and compile it for your
system. Chances
are, it will work MUCH better than this ever will. Thankyou very much. Good
day!

==================================================================

Regards,

--
Josiah Bryan
jdb@wcoil.com
Tel: 937.316.6256






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

Date: Sat, 16 Sep 2000 22:24:19 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: binmode(): How is OS related with "\n"?
Message-Id: <slrn8s7th2.li.tim@degree.ath.cx>

Bart Lateur <bart.lateur@skynet.be> wrote:
> Tim Hammerquist wrote:
> 
> >It's apparently inaccurate to say "all" open files.  However, we know
> >*nix won't care one way or another because of the perldoc quote above.
> 
> No, you forget about the side effect on PC.

How am I wrong in this?  I said "*nix won't care one way or another."
Since when did PC (which I interpreted as DOS/Windoze) come under *nix?

-- 
-Tim Hammerquist <timmy@cpan.org>

Experience is a good school, but the fees are high.
	-- Heinrich Heine


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

Date: Sat, 16 Sep 2000 19:39:26 GMT
From: "Indy Singh" <indy@remove_this_indigostar.com>
Subject: Re: Copying Files
Message-Id: <O%Pw5.12396$m7.5795486@news3.rdc1.on.home.com>

Patrick Connolly <patrickjos@hotmail.com> wrote in message
news:39C2DBBF.A7D3A993@hotmail.com...
>
> I'm trying to develop a perlscript to copy files (on windows nt)  from
> one directory to another.  The simple requirements are:
> 1.  The timestamp of the file must NOT be modified.
> 2.  There must be no "noise" output to the screen.
> 3.  There should be a way to verify that the copy was successful.
>
> The problem:
> 1. I've tried the copy() function from File::Copy module. On windows
> NT,  it modifies the timestamp to current time.
> 2. I've tried using  system("copy sourcefile destfile")  but it prints
> out noise to the screen for every file it copies.
>
>     Any suggestions ?
>
> Patrick
>
>



Use stat to get the time of of the source file, and use utime to set the
time of the dest file after copying.  See example below.


sub copy_file_ex
{
    my ($src, $dest) = @_;
    # copy file src -> dest preserve source file times and dest permissions
    local ($/);
    open (IN, $src) || die "Can't open $src $!\n";
    my $srctime = (stat($src))[9];
    my $srcmode = (stat($src))[2];

    my $destmode;
    binmode IN;
    $/ = undef;
    my $data = <IN>;
    close IN;
    if (-e $dest) {
        $destmode = (stat($dest))[2];
     chmod(0666, $dest);
    } else {
        # use dest file mode if avail, else use source file's mode
        $destmode = $srcmode;
    }
    open (OUT, ">$dest") || die "Can't create $dest $!\n";
    binmode OUT;
    print OUT $data;
    close OUT;
    utime $srctime, $srctime, $dest;
    chmod $destmode, $dest;
}


--
Indy Singh
IndigoSTAR Software -- www.indigostar.com






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

Date: Sat, 16 Sep 2000 19:39:23 GMT
From: ptomsic@my-deja.com
Subject: help with HTML::Parser please
Message-Id: <8q0i98$d8t$1@nnrp1.deja.com>

Hi,
I'm trying to use the HTML::Parser to retrieve information that is
contained between HTML -pseudo-comment tags, something like the
following:

<!-- Start Content Here -->

This is desired text

<!-- End Content Here -->

The tags are consistent in the wording "Start content here" and "end
content here" but there is no consistency to the number of hyphens or
spaces, so it could be
<!----      START content here     ----------->

The following script, I believe, should work, but it apparently is not.
Could someone please help?

Thanks, any help greatly appreciated.




use HTML::Parser;

sub begin_comment {
      my ($self,$token) = @_;
      goto &{$self->handler(default)}
              unless $token =~ /start\s+content\s+here/i;
      $self->handler(default => sub {print shift}, "text");
      $self->handler(comment => \&end_comment, "self,token0");
}

sub end_comment {
      my ($self,$token) = @_;
      goto &{$self->handler(default)}
          unless $token =~ /end\s+content\s+here/i;
      $self->eof;
}

  my $p = HTML::Parser->new(api_version=>3);
  $p->handler(comment => \&begin_comment,"self,token0");
  $p->handler(default => "");
  $p->parse($_);
  $p->eof;



Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Sat, 16 Sep 2000 14:05:55 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: help with HTML::Parser please
Message-Id: <39C3E0B3.24AB325@stomp.stomp.tokyo>

ptomsic@my-deja.com wrote:


> I'm trying to use the HTML::Parser

This is your first serious problem.


> to retrieve information that is contained between HTML 
> -pseudo-comment tags, something like the following:

What do you mean "something like" ? Are these tags 
precisely as exemplified and discussed or not?


> <!-- Start Content Here -->
 
> This is desired text
 
> <!-- End Content Here -->
 
> The tags are consistent in the wording "Start content here" 
> and "end content here" 

"Start content here" and "end content here" are not
the same as shown in your example. Exactly what are
your parameters? Do you know? I will use a leading
capital letter for each word with your not being
able to state clear concise parameters. Once you
have figured out your parameters, which seems a
difficult feat for you, make needed changes in
my code, such as "i" for ignore case.


> but there is no consistency to the number of hyphens or
> spaces, so it could be
> <!----      START content here     ----------->

Yeah, so? Piece of cake with a little thinking.

 
> The following script, I believe, should work, 
> but it apparently is not.

"Apparently" ??? Does your script work or not?
I would think determining whether or not your
script works, would be exceptionally easy.

 
> use HTML::Parser;

(snipped a lot of code)

Major mistake for something this simple. There is
no need to use a Perl 5 Cargo Cult module which will
only serve to bloat your memory usage and slow
down your script, significantly, not to mention
cause untold unending problems for you. 

Do not respond with changed parameters and,
"This doesn't work."


Godzilla!
-- 
Dr. Kiralynne Schilitubi ¦ Cooling Fan Specialist
UofD: University of Duh! ¦ ENIAC Hard Wiring Pro
BumScrew, South of Egypt ¦ HTML Programming Class



TEST SCRIPT:
____________


#!/usr/local/bin/perl

print "Content-type: text/plain\n\n";

$/ = "";

open (TEST, "test.txt");
$string = <TEST>;
close (TEST);

print "Input:\n\n$string\n\n";

$string =~ s¡ \n¡ ¡g;
$string =~ s¡\n ¡ ¡g;
$string =~ s¡\n¡¡g;
$string =~ s¡<![- ]+Start Content Here[- ]+>¡¦¿¡g;
$string =~ s¡<![- ]+End Content Here[- ]+>¡¿¦¡g;

@Array = split (/¦/, $string);

print "Output:\n\n";

foreach $element (@Array)
 { 
  if (index ($element, "¿") gt -1)
   {
    $element =~ s¡¿¡¡g;
    $element =~ s¡^\s+¡¡;
    print "  $element\n";
   }
 }

exit;



PRINTED RESULTS:
________________

Input:

<HTML JUNK><META TAG JUNK>
<BODY JUNK><!--  -- Start Content
 Here --> This is desired text
 one <!-- End Content Here --><COM
 MENT JUNK><FONT JUNK> Unwanted
 words and JUNK <MORE JUNK>
MULE MANURE MULE MANURE MULE MANURE
<!-- Start Comments Here -->
Junk Comments More Junk Comments
<!-- End Comments Here   -->
MULE MANURE MULE MANURE MULE MANURE
 <!-- Start Content Here ---------->
This is desired text two
 <!----        End Content Here -><TURN 
OFF HTML JUNK>


Output:

  This is desired text one 
  This is desired text two


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

Date: Sat, 16 Sep 2000 17:21:29 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: help with HTML::Parser please
Message-Id: <brian-ya02408000R1609001721290001@news.panix.com>

In article <8q0i98$d8t$1@nnrp1.deja.com>, ptomsic@my-deja.com posted:

> I'm trying to use the HTML::Parser to retrieve information that is
> contained between HTML -pseudo-comment tags, something like the
> following:

> <!-- Start Content Here -->
> This is desired text
> <!-- End Content Here -->

if the problem is really this simple, HTML::Parser is probably 
overkill.

> The tags are consistent in the wording "Start content here" and "end
> content here" but there is no consistency to the number of hyphens or
> spaces, so it could be
> <!----      START content here     ----------->

you could use a regex and the flipflop operator.

   while( <> )
      {
      print if 
         /<!-+\s+START content here\s+-+>/i
         ..
         /<!-+\s+END content here\s+-+>/i;
      }

this will print all such groups in the file, including 
the start and end tokens.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>


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

Date: Sat, 16 Sep 2000 23:45:00 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: help with HTML::Parser please
Message-Id: <Pine.GHP.4.21.0009162341290.11602-100000@hpplus03.cern.ch>


On Sat, 16 Sep 2000 ptomsic@my-deja.com wrote:

> The tags are consistent in the wording "Start content here" and "end
> content here" but there is no consistency to the number of hyphens or
> spaces, so it could be
> <!----      START content here     ----------->

I hope you're aware that such a syntax would violate both the official
SGML rules and the simplified HTML rules for comment syntax?

It might not matter to you, since you're evidently going to parse your
quasi-HTML and replace it with something else before claiming it to be
HTML, but you still should be aware (for example if you are trying to
use a parser designed to parse HTML) that you're inroducing extra
difficulties for yourself here.

good luck



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

Date: Sat, 16 Sep 2000 22:19:45 GMT
From: ptomsic@my-deja.com
Subject: Re: help with HTML::Parser please
Message-Id: <8q0rlj$nj5$1@nnrp1.deja.com>



> > to retrieve information that is contained between HTML
> > -pseudo-comment tags, something like the following:
>
> What do you mean "something like" ? Are these tags
> precisely as exemplified and discussed or not?

Sorry, my wording was a bit ambiguious.
They're precisely what I stated:

>
> > <!-- Start Content Here -->
>
> > This is desired text
>
> > <!-- End Content Here -->
>
>
> "Start content here" and "end content here" are not
> the same as shown in your example. Exactly what are
> your parameters? Do you know? I will use a leading
> capital letter for each word with your not being
> able to state clear concise parameters. Once you
> have figured out your parameters, which seems a
> difficult feat for you, make needed changes in
> my code, such as "i" for ignore case.

Hehehe... Thanks.

>
> > The following script, I believe, should work,
> > but it apparently is not.
>
> "Apparently" ??? Does your script work or not?

It does not work.  Again, my ambiguious wording.  Apologies

Thanks for the script.  Appreciate it.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 16 Sep 2000 21:11:03 GMT
From: clay@panix.com (Clay Irving)
Subject: Re: How can I do this ?
Message-Id: <slrn8s7of7.f52.clay@panix3.panix.com>

On Fri, 15 Sep 2000 23:04:42 GMT, pularis@my-deja.com <pularis@my-deja.com> 
wrote:

>I need to generate date in the following format:- for 9/15/200 I want
>9_15_00. How should I do this ?. All help will be greatly appreciated.

Do you just want to substitute "_" for  "/"?

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

  $date = "09/15/00";
  $date =~ tr/\//\_/;
  print "$date\n";

prints:

  09_15_00

-- 
Clay Irving <clay@panix.com>
Goldilocks is about property rights. Little Red Riding Hood is a tale of
seduction, rape, murder, and cannibalism. 
- Bernard J. Hibbits 


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

Date: 16 Sep 2000 16:30:14 -0500
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: How can I do this ?
Message-Id: <m3vgvwauu1.fsf@dhcp11-177.support.tivoli.com>

clay@panix.com (Clay Irving) writes:

> On Fri, 15 Sep 2000 23:04:42 GMT, pularis@my-deja.com <pularis@my-deja.com> 
> wrote:
> 
> >I need to generate date in the following format:- for 9/15/200 I want
> >9_15_00. How should I do this ?. All help will be greatly appreciated.
> 
> Do you just want to substitute "_" for  "/"?
> 
>   #!/usr/local/bin/perl -w
> 
>   $date = "09/15/00";
>   $date =~ tr/\//\_/;
                ^  ^---- this isn't needed at all
                |
                \------- and this can be avoided by changing delimiters

             tr|/|_|;

>   print "$date\n";
> 
> prints:
> 
>   09_15_00

-- 
Ren Maddox
ren@tivoli.com


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

Date: Sat, 16 Sep 2000 18:46:58 GMT
From: Yanick Champoux <yanick@babyl.sympatico.ca>
Subject: Re: how do I alphabetize this?
Message-Id: <CePw5.245571$Gh.5847811@news20.bellglobal.com>

matthew shir <hshir@mediaone.net> wrote:


: I want the contents of a list to print out in alphabetical order.
: Any ideas on how to do this? thanks!

You probably may want to use a sort of function to do that...
                               ----
                                |
                                |
                                V
                   perldoc -f 

Joy,
Yanick

-- 
eval" use 'that poor Yanick' ";
print map{ (sort keys %{{ map({$_=>1}split'',$@) }})[hex] }
qw/8 b 15 1 9 10 11 15 c b 13 1 12 b 13 f 1 c 9 a e b 13 0/;


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

Date: Sat, 16 Sep 2000 12:46:29 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: how do I alphabetize this?
Message-Id: <39C3CE15.DDD5C41@stomp.stomp.tokyo>

matthew shir scribbled:
 
> I want the contents of a list to print out in 
> alphabetical order. Any ideas on how to do this?


A good idea is to decide what are your contents
of this list. You have stated no parameters for
your list. Shirley you don't expect an answer?


Miss Christie Christian
--
No Tell Motel
 http://la.znet.com/~callgirl/android/notell.cgi


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

Date: 16 Sep 2000 16:57:09 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: Is there a file rename function?
Message-Id: <39c3fac5@cs.colorado.edu>

In article <MPG.14293818b2e582b598978d@localhost>,
jason  <elephant@squirrelgroup.com> wrote:
>can you confirm that
>
>  http://doriath.perl.com/misc/perlman-alpha0.tar.gz
>
>contains a /bin/ and all the files in it (I guess at least perlman .. I 
>don't know what else is there to get the magical perlXXX behaviour)

I would *never* put a /bin/ there!  This is an in-place snapshot.
It's not an installation tar.  The bin is underneath.

    doriath% tar tzf perlman-alpha0.tar.gz
    perlman/
    perlman/etc/
    perlman/etc/NOTES
    perlman/etc/Camel-committment
    perlman/etc/perlrtfm.pod
    perlman/etc/ISSUES
->  perlman/bin/
    perlman/bin/perldoc
    perlman/bin/docpath
    perlman/bin/mandirs
    perlman/bin/olpod
    perlman/bin/pmanpath
    perlman/bin/pmpath
    perlman/bin/pmpodpath
    perlman/bin/pod2manpath
    perlman/bin/podgrep
    perlman/bin/podlibdir
    perlman/bin/podpath
    perlman/bin/progpodpath
    perlman/bin/stdpodpath
    perlman/bin/tcgrep
    perlman/bin/catpod
    perlman/bin/perlman
    perlman/bin/perlhelp
    perlman/bin/perl5004delta
    perlman/bin/perl5005delta
    perlman/bin/perlamiga
    perlman/bin/perlapi
    perlman/bin/perlapio
    perlman/bin/perlbook
    perlman/bin/perlboot
    perlman/bin/perlbot
    perlman/bin/perlcall
    perlman/bin/perlcompile
    perlman/bin/perlcygwin
    perlman/bin/perldata
    perlman/bin/perldbmfilter
    perlman/bin/perldebguts
    perlman/bin/perldebug
    perlman/bin/perldelta
    perlman/bin/perldiag
    perlman/bin/perldos
    perlman/bin/perldsc
    perlman/bin/perlembed
    perlman/bin/perlfaq
    perlman/bin/perlfaq1
    perlman/bin/perlfaq2
    perlman/bin/perlfaq3
    perlman/bin/perlfaq4
    perlman/bin/perlfaq5
    perlman/bin/perlfaq6
    perlman/bin/perlfaq7
    perperlman/bin/perlfaq9
    perlman/bin/perlfilter
    perlman/bin/perlfork
    perlman/bin/perlform
    perlman/bin/perlfunc
    perlman/bin/perlguts
    perlman/bin/perlhack
    perlman/bin/perlhist
    perlman/bin/perlhpux
    perlman/bin/perlintern
    perlman/bin/perlipc
    perlman/bin/perllexwarn
    perlman/bin/perllocale
    perlman/bin/perllol
    perlmaperlman/bin/perlnumber
    perlman/bin/perlobj
    perlman/bin/perlop
    perlman/bin/perlopentut
    perlman/bin/perlos2
    perlman/bin/perlos390
    perlman/bin/perlpod
    perlman/bin/perlport
    perlman/bin/perlre
    perlman/bin/perlref
    perlman/bin/perlreftut
    perlman/bin/perlrun
    perlman/bin/perlsec
    perlman/bin/perlstyle
    perlman/bin/perlsub
    perlman/bin/perlsyn
    perlman/bin/perlthrtut
    perlman/bin/perltie
    perlman/bin/perltoc
    perlman/bin/perltodo
    perlman/bin/perlunicode
    perlman/bin/perlvar
    perlman/bin/perlvms
    perlman/bin/perlwin32
    perlman/bin/perlxs
    perlman/bin/perlxstut
    perlman/README
    perlman/lib/
    perlman/lib/PM/
    perlman/lib/PM/Tools/
    perlman/lib/PM/Tools/pmpath.pm
    perlman/lib/Pod/
    perlman/lib/Pod/Tools/
    perlman/lib/Pod/Tools/perlman.pm
    perlman/lib/Pod/Tools/podgrep.pm
    perlman/lib/Pod/Tools/catpod.pm
    perlman/lib/Pod/Tools/olpod.pm

    (etc)

--tom


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

Date: Sat, 16 Sep 2000 23:35:56 GMT
From: halofive <halo_five@my-deja.com>
Subject: Just curious..
Message-Id: <8q104r$sa2$1@nnrp1.deja.com>

 Hello, I've been bugged to death by something in perl, dealing with
Hashes.  It's pretty irrelavent, I suppose but I'm curious all the same.

Summary of problem:
%hash = ("one", "two", "three")
# Notice that there's an odd number, Key "three" returns Unef

With that, here's the problem... If I wanted $hash{} to return "three",
how would I go about doing so?  Would $hash{""} do the trick, or is it
not that simple?


--
Outlook Express: Spreading more viruses than a diseased hooker.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Sat, 16 Sep 2000 20:38:09 GMT
From: tayloremail@netscapeonline.co.uk
Subject: Load graphic from form data
Message-Id: <8q0lnf$h4n$1@nnrp1.deja.com>

Hi all.
I have a form that allows the user to select different options for a
product.
When all the selections are complete, and the user clicks the
appropriate button, I want to load a flash movie to show what they have
selected graphically.
I will have a few different movies, each showing the selected product
with different options.

I need a script to proces the form data, deceide which movie should be
displayed, then upload it and display it.

Does anyone know of an example script that does this, or can anyone help
me write one from scratch?

Any help would be greatly apreciated.

Thanks.
Damian.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Sat, 16 Sep 2000 23:52:46 GMT
From: peter pilsl <pilsl@goldfisch.atat.at>
Subject: Re: lynx shows html-tags
Message-Id: <MPG.142dc3529dc816c989889@news.chello.at>

In article <slrn8s77ua.4mc.abigail@alexandra.foad.org>, abigail@foad.org 
says...
> peter pilsl (pilsl@goldfisch.atat.at) wrote on MMDLXXIII September
> MCMXCIII in <URL:news:MPG.142d9c83110d0b27989888@news.chello.at>:
> @@ 
> @@ I just ran into the following problem and it took me quite a while until I 
> @@ solved it. I just entered a question-posting when the solution came into 
> @@ my mind and so I post just the solution if someone has the same problem 
> @@ some day ... ;)
> @@ 
> @@ The output of my cgi-script was very nice in all the tested GUI-browsers 
> @@ (ie,netscape,opera) but lynx refused to show more than the pure html-code.
> @@ 
> @@ solution: if you make any output before printing the header (a small 
> @@ error-output in my case) you want see this output in all the tolerant gui-
> @@ browsers, but it will confuse lynx ....
> 
> 
> Well, beside the fact that lynx is the only one to handle this issue
> correctly (and not as you might thing the GUI b0rken browsers, written
> by people who can't code their way out of a paper bag), what has this
> to do with Perl?
> 

;)
I first thought its a problem of my usage of CGI until I discovered it. 
And it was a mistake in my perlscript and I wrote this posting after days 
of permanent perl-coding and in a html-group noone would understand this 
posting (they just discuss about the colour of their buttons)
And, okay: lynx does it like it should be done and this rotten gui-
products are, hmm, rotten ?
And before Mr.Coffeine will kill me: these @@ as quoting-signs .. is it me 
or did you really set @@ as quoting sign ;)

nice day,
peter

-- 
pilsl@
goldfisch.at


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

Date: 17 Sep 2000 00:56:26 GMT
From: abigail@foad.org (Abigail)
Subject: Re: lynx shows html-tags
Message-Id: <slrn8s85jm.h8o.abigail@alexandra.foad.org>

peter pilsl (pilsl@goldfisch.atat.at) wrote on MMDLXXIII September
MCMXCIII in <URL:news:MPG.142dc3529dc816c989889@news.chello.at>:
@@ 
@@ I first thought its a problem of my usage of CGI until I discovered it. 
@@ And it was a mistake in my perlscript and I wrote this posting after days 
@@ of permanent perl-coding and in a html-group noone would understand this 
@@ posting (they just discuss about the colour of their buttons)

Error in your coding or not, you would have the same problems if you 
did something similar in C, Java, PHP, TECO macros or Ada.

@@ And, okay: lynx does it like it should be done and this rotten gui-
@@ products are, hmm, rotten ?

Yes.

@@ And before Mr.Coffeine will kill me: these @@ as quoting-signs .. is it me 
@@ or did you really set @@ as quoting sign ;)


Must be you.


Abigail
-- 
perl -le 's[$,][join$,,(split$,,($!=85))[(q[0006143730380126152532042307].
          q[41342211132019313505])=~m[..]g]]e and y[yIbp][HJkP] and print'


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

Date: Sat, 16 Sep 2000 23:46:18 GMT
From: daniel@chetlin.com (Daniel Chetlin)
Subject: Re: perlxs - finding the class name
Message-Id: <eDTw5.1339$uQ.12821@news-west.usenetserver.com>

On Fri, 15 Sep 2000 02:20:12 -0700,
 SimonJ <sm_jamiesonNOsmSPAM@hotmail.com.invalid> wrote:
>A simple question:
>If I pass a blessed reference into an perl XS function, how can I find
>out the class name, i.e. do the C equivalent of the perl "ref" command.

Perl_sv_reftype should do the trick. E.g.:

  SV *
  myref(obj)
          SV * obj
      CODE:
          RETVAL = newSVpv(Perl_sv_reftype(SvRV(obj),TRUE),0);
      OUTPUT:
          RETVAL

-dlc




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

Date: Sat, 16 Sep 2000 22:57:31 GMT
From: Brendon Caligari <bcaligari@my-deja.com>
Subject: Re: Qualifications for new Perl programmer?????
Message-Id: <8q0tsk$q2k$1@nnrp1.deja.com>

In article <slrn8s7c9a.6uu.dha@panix6.panix.com>,
  dha@panix.com (David H. Adler) wrote:
> On Fri, 15 Sep 2000 13:36:26 GMT, Brendon Caligari
> <bcaligari@my-deja.com> wrote:
[snip all]
>
> Of course, all this assumes that the student in question isn't
> impervious to learning in the first place...
>
> dha

Given the way I've been flamed here especially by some of the
grandmasters, I would like to stress out that it wasn't my
intention to hurt anybody's feelings.

I believe that there is a consensus that while Perl is good,
perl alone is not sufficient for a comprehensive education in
programming.  It would be pretentious of oneself to call
himself or practice as a programmer if his exposure has been
limited to one language.  At the end of the day, a programming
language is a tool with which to carry out solutions derived
from certain theories and practices.

Brendon




Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Sat, 16 Sep 2000 19:30:06 +0100
From: "John Plaxton" <19wlr@globalnet.co.uk>
Subject: Re encrypting a string
Message-Id: <8q0eak$jq4$1@gxsn.com>

Hi there,

Has anyone got some simple encrypt and decrypt functions that will slightly
scramble a string for a password. Nothing too fancy, this isn't pgp!!

Thanks in advance, or should I say "hghjklukjgs;d;dc;lds;klufdkckl".


Cheers John




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

Date: Sat, 16 Sep 2000 19:19:32 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Re encrypting a string
Message-Id: <8JPw5.5061$3y3.122621@typhoon.austin.rr.com>

In article <8q0eak$jq4$1@gxsn.com>, John Plaxton <19wlr@globalnet.co.uk> wrote:
>Hi there,
>
>Has anyone got some simple encrypt and decrypt functions that will slightly
>scramble a string for a password. Nothing too fancy, this isn't pgp!!
>
>Thanks in advance, or should I say "hghjklukjgs;d;dc;lds;klufdkckl".

Have you looked at perl's built-in crypt function?

  perldoc -tf crypt

should present you with the relevant section of the perl
documentation.  

It's a one-way hashing function, so the way you check a user's password is
to encrypt the one they present and compare it with the encrypted version
of their password.  I realise that you asked for encrypt and decrypt
functions, but is this adequate?

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |
GPG PGP Key 1024D/059913DA         | Fingerprint      0570 71CD 6790 7C28 3D60
stok@colltech.com (CT - work)      |                  75D2 9EC4 C1C0 0599 13DA


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

Date: 16 Sep 2000 19:21:45 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Re encrypting a string
Message-Id: <slrn8s7i06.4mc.abigail@alexandra.foad.org>

John Plaxton (19wlr@globalnet.co.uk) wrote on MMDLXXIII September
MCMXCIII in <URL:news:8q0eak$jq4$1@gxsn.com>:
`` Hi there,
`` 
`` Has anyone got some simple encrypt and decrypt functions that will slightly
`` scramble a string for a password. Nothing too fancy, this isn't pgp!!

sub encrypt ($) {reverse shift}
sub decrypt ($) {encrypt encrypt encrypt shift}


HTH. HAND.


Abigail
-- 
               split // => '"';
${"@_"} = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_)  {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};


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

Date: Sat, 16 Sep 2000 20:48:53 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Re encrypting a string
Message-Id: <39C3DCCF.82B19179@rochester.rr.com>

John Plaxton wrote:
> 
> Hi there,
> 
> Has anyone got some simple encrypt and decrypt functions that will slightly
> scramble a string for a password. Nothing too fancy, this isn't pgp!!
> 
> Thanks in advance, or should I say "hghjklukjgs;d;dc;lds;klufdkckl".
> 
> Cheers John

One simple way to "slightly" scramble a string would be to use tr, for
example:

    $string=~tr/a-mA-Mn-zN-Z0-9/N-Zn-zA-Ma-m9876543210/;

Passing the string through once will encrypt it; again will decrypt it. 
HTH.
-- 
oBO jNYGBA


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

Date: Sat, 16 Sep 2000 23:44:54 GMT
From: andre_sanchez@my-deja.com
Subject: Recipe For Sorting LoL
Message-Id: <8q10lj$ss8$1@nnrp1.deja.com>

I am looking for a recipe for sorting a LoL. Thanks in advance for
pointing me in the right direction.

I have a List of Lists (LoL) populated with words. I would like to
sort it alphabetically. Simplistic example (the actual LoL is
populated by variable length lists):

@LoL = ( ['Fruit', 'Banana'],
	 ['Vegetable', 'Lettuce'],
         ['Fruit', 'Apple'],
	 ['Vegetable', 'Celery']);

@sorted_LoL = recipe(@LoL);

for $aref ( @LoL ) {
    print "@$aref\n";
}

for $aref ( @sorted_LoL ) {
    print "@$aref\n";
}

sub recipe{
# Magical Routine Returns Sorted LoL
}

Would return:

Fruit Banana
Vegetable Lettuce
Fruit Apple
Vegetable Celery

Fruit Apple
Fruit Banana
Vegetable Celery
Vegetable Lettuce


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Sun, 17 Sep 2000 00:41:10 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Recipe For Sorting LoL
Message-Id: <slrn8s84p3.3ij.tjla@thislove.dyndns.org>

I was shocked! How could andre_sanchez@my-deja.com <andre_sanchez@my-deja.com>
say such a terrible thing:
>I am looking for a recipe for sorting a LoL. Thanks in advance for
>pointing me in the right direction.

You need to read the documentation:

perldoc -f sort
perldoc -q sort

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Do I contradict myself?
Very well then I contradict myself,
(I am large, I contain multitudes.)
		-- Walt Whitman, "Leaves of Grass", 1855


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 4343
**************************************


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