[25791] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8030 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 29 18:05:17 2005

Date: Fri, 29 Apr 2005 15:05:07 -0700 (PDT)
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, 29 Apr 2005     Volume: 10 Number: 8030

Today's topics:
    Re: Can this be rewritten better? <hackeras@gmail.com>
    Re: Can this be rewritten better? <hackeras@gmail.com>
    Re: Can this be rewritten better? <lawshouse.public@btconnect.com>
    Re: Can this be rewritten better? <hackeras@gmail.com>
    Re: Can this be rewritten better? <pilkowsk@informatik.uni-marburg.de>
    Re: Can this be rewritten better? <pilkowsk@informatik.uni-marburg.de>
    Re: Entirely new idea for a webpage <tadmc@augustmail.com>
        Finally a better script! <hackeras@gmail.com>
    Re: Finally a better script! <lawshouse.public@btconnect.com>
    Re: Finally a better script! <darkon.tdo@gmail.com>
    Re: Finally a better script! <1usa@llenroc.ude.invalid>
    Re: LogReader.pl <john@castleamber.com>
    Re: Looking for Perl Grammar <nospam@bigpond.com>
    Re: Looking for Perl Grammar (Anno Siegel)
    Re: multiples ifs <skuo@mtwhitney.nsc.com>
    Re: multiples ifs <tadmc@augustmail.com>
    Re: multiples ifs <kst-u@mib.org>
        Windows Clipboard <sguest@iee.org>
    Re: Windows Clipboard <apeiron+usenet@coitusmentis.info>
    Re: Windows Clipboard <lawshouse.public@btconnect.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 29 Apr 2005 21:14:32 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: Can this be rewritten better?
Message-Id: <d4tti8$ntv$1@nic.grnet.gr>

Tim Hammerquist wrote:
> Nikos <hackeras@gmail.com> wrote:
> 
>> my $script = param('select') or " !";
> 
> 
> If you want to set $script to " !" if param('select') is
> empty, you'll probably want to use the || operator instead of "or".  As
> it is, $script will either be set to param('select') or undef.
> 
> HTH,
> Tim Hammerquist

Thank you Tim, but why is this happening?

|| and or are functioning the same way as far as i know.


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

Date: Fri, 29 Apr 2005 21:16:24 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: Can this be rewritten better?
Message-Id: <d4ttlo$ntv$2@nic.grnet.gr>

Tim Hammerquist wrote:
> Nikos <hackeras@gmail.com> wrote:
> 
>>Can we make it even shorter and better written?
> 
> 
> You sure can.  You might want to read up on Perl some more.  The best
> way to learn to program fast, efficient Perl code is study, practice,
> and lurking in these here newsgroups.
> 
> Posting code and asking if there's a better way is not a good approach.
> 
> Yes, there's probably a better way to write it.  And for a standard fee,
> many people here would be happy to show you.

Help a newbie man, i cant afford paying....iam trying
and laerning by asking and finding better ways of writing the code.
please.



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

Date: Fri, 29 Apr 2005 20:06:15 +0100
From: Henry Law <lawshouse.public@btconnect.com>
Subject: Re: Can this be rewritten better?
Message-Id: <fb15711vn3r0ftk3nqjde5b3qhq1ine7rh@4ax.com>

On Fri, 29 Apr 2005 21:16:24 +0300, Nikos <hackeras@gmail.com> wrote:

>Tim Hammerquist wrote:
>> Posting code and asking if there's a better way is not a good approach.
>> 

>Help a newbie man, i cant afford paying....iam trying
>and laerning by asking and finding better ways of writing the code.

The code works (you said); it's not terrible; don't change anything
more - move on to something else.


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

Date: Fri, 29 Apr 2005 22:52:09 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: Can this be rewritten better?
Message-Id: <d4u396$t14$1@nic.grnet.gr>

Henry Law wrote:

> The code works (you said); it's not terrible; don't change anything
> more - move on to something else.

Iam under the idea of making it as shorter, as clearer and as 
strightforward as it can gets.
O cant relax until this is done.


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

Date: Fri, 29 Apr 2005 23:40:22 +0200
From: Fabian Pilkowski <pilkowsk@informatik.uni-marburg.de>
Subject: Re: Can this be rewritten better?
Message-Id: <3dfns8F6fo8muU1@individual.net>

* Nikos schrieb:
> Tim Hammerquist wrote:
>> 
>>> my $script = param('select') or " !";
>> 
>> If you want to set $script to " !" if param('select') is
>> empty, you'll probably want to use the || operator instead of "or".  As
>> it is, $script will either be set to param('select') or undef.
> 
> Thank you Tim, but why is this happening?
> || and or are functioning the same way as far as i know.

Well, as far as *you* know. Tim has told you that there's a difference
between || and or. Why do you ask here? Please have a look into the
docs, it is mentioned in `perldoc perlop` since both are operators.

You have said you will learn by asking here. But -- and please think
about that -- what should we do to help you? Should I quote the docs for
you now? I don't think that's really necessary.

regards,
fabian


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

Date: Fri, 29 Apr 2005 23:50:59 +0200
From: Fabian Pilkowski <pilkowsk@informatik.uni-marburg.de>
Subject: Re: Can this be rewritten better?
Message-Id: <3dfog2F6on120U1@individual.net>

* Nikos schrieb:
> 
> The script is working but i want to write it as betetr as possible.
> ima learnign this way.

But, and I hope you will realize this soon, here is no one for teaching
you this way.

First you've posted your complete scripts here, large and unclear. Then
you've heard that you should ask *specific questions* if you want some
help. And what are you doing? You're just posting small unchanged chunks
of your script to get some better versions. That's not correct.

Please read the posting guidelines for this group again! Btw, have you
ever read them really?

Last, it is a bad idea to get *nicer* code from some people here with
your skill level. Your code is good enough if *you* understand it.

regards,
fabian


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

Date: Fri, 29 Apr 2005 15:13:56 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Entirely new idea for a webpage
Message-Id: <slrnd755c4.e75.tadmc@magna.augustmail.com>

Richard Gration <richard@zync.co.uk> wrote:
> On Fri, 29 Apr 2005 07:29:17 -0700, Keith Keller wrote:
> 
>> On 2005-04-28, Tad McClellan <tadmc@augustmail.com> wrote:
>>>
>>> Have you considered learning Python instead?
>> 
>> That's not very nice to the Python folks!  :-\

> Maybe we can connect Nikos' STDOUT to Xah Lee's STDIN 8^)


LOL!


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Fri, 29 Apr 2005 22:07:54 +0300
From: Nikos <hackeras@gmail.com>
Subject: Finally a better script!
Message-Id: <d4u0m7$qjt$1@nic.grnet.gr>

You understand very quickly what i wanted to do and you helped me write 
the correct way.
After all of the guys suggestions here is how the script transformed:


=========================================================
my $script = param('select') || "Welcome Page!";
my ($data, @data);


if (param('select') and param('select') ne '..')
{
     open(FILE, "<../data/text/$script.txt") or die $!;
          @data = <FILE>;
     close(FILE);

     $data = join('', @data);

     $dbh->do( "UPDATE guestlog SET script='$script' WHERE host='$host'" 
) or die $dbh->errstr;
}
else
{
     $sth = $dbh->prepare( "SELECT host FROM guestlog WHERE host=?" );
     $sth->execute($host);

     if ($sth->rows)
     {
         $sth = $dbh->prepare( "UPDATE guestlog SET 
hostcount=hostcount+1 WHERE host=?" );
         $sth->execute($host);

         $sth = $dbh->prepare( "SELECT * FROM guestlog WHERE host=?" );
         $sth->execute($host);
         $row = $sth->fetchrow_hashref;

         $data = "Êáëþò Þëèåò " .$host. "! ×áßñïìáé ðïõ âñßóêåò ôçí 
óåëßäá åíäéáöÝñïõóá!\n" .
                 "Ôåëåõôáßá öïñÜ Þñèåò åäþ ùò " .$row->{host}. " óôéò " 
 .$row->{date}. " !!\n" .
                 "ÓýíïëéêÝò Þñèåò åäþ " .$row->{hostcount}. " öïñÝò!!!\n" .
                 "Ôåëåõôáßá åßäåò ôï êåßìåíï { " .$row->{script}. " }\n" .
                 "Ðïéü êåßìåíï èá ìåëåôÞóåòé áõôÞí ôçí öïñÜ !?";
     }
     else
     {
         if ($host ne "Íßêïò")
         {
             $data = "ÃåéÜ óïõ " .$host. "!\n" .
             "¸ñ÷åóáé ãéá 1ç öïñÜ åäþ !!\n" .
             "Åëðßæù íá âñåßò ôá êåßìåíá åíäéáöÝñïíôá :-)";

             $sth = $dbh->prepare("SELECT * FROM guestlog WHERE host=?");
             $sth->execute($host);

             $sth = $dbh->prepare( "INSERT INTO guestlog (host, date, 
script, hostcount, pagecount) VALUES (?, ?, ?, ?, ?)" );
             $sth->execute($host, $date, $script, $hostcount, $pagecount);
         }
         else
         {
             $data = "ÃåéÜ óïõ Íéêüëá, ôé ÷áìðÜñéá?! ¼ëá äåîéÜ íá óïõ 
ðÜíå ðÜíôá! ;-)";
         }
     }
}
=========================================================


I wish i can test ti but iam currently having a mysql problem but thing 
it will work :-)
If we still can make it shorter please let me know!


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

Date: Fri, 29 Apr 2005 22:15:41 +0100
From: Henry Law <lawshouse.public@btconnect.com>
Subject: Re: Finally a better script!
Message-Id: <rf85715pdvtosdbd2bu9d56cr7gorcq2tt@4ax.com>

On Fri, 29 Apr 2005 22:07:54 +0300, Nikos <hackeras@gmail.com> wrote:

>You understand very quickly what i wanted to do and you helped me write 
>the correct way.
>After all of the guys suggestions here is how the script transformed:

Well, you missed one of mine.

>=========================================================
>my $script = param('select') || "Welcome Page!";
>my ($data, @data);
>
>
>if (param('select') and param('select') ne '..')

And I'm sure in my own mind that this statement isn't going to do what
you want.  For a start you do realise that "ne" is higher priority
than "and" so this is going to evaluate (param('select') ne '..')
first (yielding a true/false value), and then take the result and
logically "and" it with the _same_ param('select').  I may be
completely wrong and it is exactly what you want (I'm not a skilled
Perl-ist myself) but I can't imagine what value of param('select')
will yield sense in that statement.

>{
>     open(FILE, "<../data/text/$script.txt") or die $!;

Where did $script come from?  Not this program, evidently.

<snip>

>     $data = join('', @data);

$data never seems to get used.  All the occurrences of it from here on
are on the left hand side of an assignment.  I can't the point of
slurping the contents of $script.txt in and jamming it all together.

<snipped rest of the code>

>I wish i can test ti but iam currently having a mysql problem but thing 
>it will work :-)

What?  You're posting all this stuff and you haven't tested it?  I'm
wasting my time then.  Sheesh.

>If we still can make it shorter please let me know!

Shorter != better.  

Now get this:  Unless you post code that RUNS and doesn't contain
unnecessary material unrelated to your question, and show YOUR output
from it, and explain accurately why it's not doing what you thought it
should do, then I'm not going to write another word to try to help
you.  Most other people have bailed out already.


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

Date: Fri, 29 Apr 2005 21:35:44 -0000
From: "David K. Wall" <darkon.tdo@gmail.com>
Subject: Re: Finally a better script!
Message-Id: <Xns9647B2FE220DDdkwwashere@216.168.3.30>

Henry Law <lawshouse.public@btconnect.com> wrote:

> On Fri, 29 Apr 2005 22:07:54 +0300, Nikos <hackeras@gmail.com>
> wrote: 
> 
[snip]
>>=========================================================
>>my $script = param('select') || "Welcome Page!";
     ^^^^^^^

[snip]
>>     open(FILE, "<../data/text/$script.txt") or die $!;
> 
> Where did $script come from?  Not this program, evidently.

It was there, you just missed it. I'd guess that maybe you expected 
it to not be there.  Understandable.  :-)


> Now get this:  Unless you post code that RUNS and doesn't contain
> unnecessary material unrelated to your question, and show YOUR
> output from it, and explain accurately why it's not doing what you
> thought it should do, then I'm not going to write another word to
> try to help you.  Most other people have bailed out already.

I've been lurking, not posting, but I also have little interest in 
trying to help someone who admits to being uninterested in Reading 
The Fine Manual and other helpful resources.


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

Date: Fri, 29 Apr 2005 21:41:07 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Finally a better script!
Message-Id: <Xns9647B3CF6F1FAasu1cornelledu@127.0.0.1>

Nikos <hackeras@gmail.com> wrote in news:d4u0m7$qjt$1@nic.grnet.gr:

> You understand very quickly 

Well, yes, I tend to, but who is this comment directed to?

> my ($data, @data);

Always declare variables in the smallest applicable scope. I am not sure 
what you want to do with these variables.

See http://perl.plover.com/FAQs/Namespaces.html

>      open(FILE, "<../data/text/$script.txt") or die $!;
>           @data = <FILE>;
>      close(FILE);
> 
>      $data = join('', @data);

1. Where did $script come from?

2. If you just want to slurp the file, then do so:

my $data;
{
    my $fn = "/data/text/$script.txt";
    open my $file, '<', $fn or die "Cannot open $fn: $!";
    local $/;
    $data = <$file>;
    close $file or die "Cannot close $fn: $!";
}

$data will now contain the entire contents of /data/text/$script.txt.

Or, you can use the excellent File::Slurp module.

Sinan

-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html


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

Date: 29 Apr 2005 20:44:34 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: LogReader.pl
Message-Id: <Xns9647A023C8346castleamber@130.133.1.4>

Brian Wakem wrote:

> John Bokma wrote:
> 
>>>     for $foo (split(//, $_)) {
>>>        for(1..300000) {};
>> 
>>          ^^^^^ silly, I can even
>> imagine Perl just drops that. Use sleep, or
>> something related.
>>
> 
> 
> I remember using code like that for pauses in BASIC on an old Amstrad
> CPC464 when I was about 8!

What !? You didn't use all those precious clock cycles to calculate another 
Mandelbrot?

-- 
John                   Small Perl scripts: http://johnbokma.com/perl/
               Perl programmer available:     http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html
                        


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

Date: Sat, 30 Apr 2005 06:59:24 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: Looking for Perl Grammar
Message-Id: <4272a0ed_2@x-privat.org>

Khamis Abuelkomboz wrote:

> Hi
> 
> I'm writing a Perl parser and I'm looking for a pure perl grammar. the
> documentation from perl is not a pure grammar, it's more a documentation
> of the perl language.

I have no idea what a pure grammar is.

> thanks in advance

Its generally agreed there isn't one and I doubt there is even a context
free grammar for Perl.  There are lots of thorny issues like regular
expressions, arbitrary delimiters (how do you write a rule for m#...# or m|  
|  ), constructs what change the grammar itself eg use subs.

Have a look thru the Chomsky hierarchy to get your terms right.
http://en.wikipedia.org/wiki/Chomsky_hierarchy

gtoomey


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

Date: 29 Apr 2005 21:18:34 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Looking for Perl Grammar
Message-Id: <d4u8ba$obf$1@mamenchi.zrz.TU-Berlin.DE>

Christopher Nehren  <apeiron+usenet@coitusmentis.info> wrote in comp.lang.perl.misc:
> On 2005-04-29, Khamis Abuelkomboz scribbled these curious markings:
> > I'm writing a Perl parser and I'm looking for a pure perl grammar. the
> > documentation from perl is not a pure grammar, it's more a
> > documentation of the perl language.
> 
> [Please wrap your lines at 70-72 characters. Thank you.]
> 
> First, a bit of folklore: "Only perl can parse Perl". What this means is
> that only perl (the program) is capable of properly and completely
> parsing Perl (the language).

It is more than just folklore.  For example, you cannot decide if a
bareword is just that, or a function to be called, unless all use
statements up to that point have been executed.  That requires a Perl
interpreter.

Anno


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

Date: Fri, 29 Apr 2005 12:55:17 -0700
From: Steven Kuo <skuo@mtwhitney.nsc.com>
Subject: Re: multiples ifs
Message-Id: <Pine.GSO.4.21.0504291240030.10146-100000@mtwhitney.nsc.com>

On Fri, 29 Apr 2005, Henry Law wrote:

(snipped)
 
> What he's trying to do is to make n tests for the non-true-evaluation
> of n separate variables (he's presumably using that to infer their
> zero-lengthness and therefore their non-existence), issue a customised
> message for each one that is false, and then exit with a zero code if
> there was at least one error.  It's a fair question and I for one
> can't find a neater way of doing it.
> 
> Here's a traditional ASCII codepage version, which makes it easier to
> see:
> 
> 	# No strict, warnings - this is a fragment
> 	# Untested for the same reason
> 	# Probably crashes if $a or $b etc is undef
> 
> 	my $fail=0;
> 	unless ($a) {
> 		print "Error message for missing \$a\n"; 
> 		$fail=1;
> 	}
> 	unless ($b) {
> 		print "Different error message for missing \$b\n";
> 		$fail=1;
> 	}
> 	# Etc for n different variables; his n=4
> 	#
> 
> 	exit 0 if $fail;
> 
> 	print "We succeeded - they were all there\n";
> 
> Looks pretty clunky to me.  Maybe some "eval" construct would help?
> I'm not good enough to try it.



To refactor using 'eval', one could try:


use strict;
use warnings;
use CGI;

my ( $name, $pray, $remark, $email );

my %prompt_if_missing = (
    name   => "Something about a name.",
    pray   => "Something about prayer?",
    remark => "A remark of some sort.",
    email  => "More spam please!",
);

$remark = 'foo';
$pray   = 'for rain';

my $amiss;
for my $k (keys %prompt_if_missing)
{
    my $field = eval "\$$k";  # please read perldoc -f eval
    die $@ if $@;
    unless (defined($field) and length $field)
    {
	print CGI::font(
	    { class => 'tip' },
	    $prompt_if_missing{$k}
	), "\n";
	$amiss = 1; 
    }
}

exit if $amiss;


Given the experience level of the OP, however, it's probably best
that he avoid using 'eval' at present.



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

Date: Fri, 29 Apr 2005 15:40:50 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: multiples ifs
Message-Id: <slrnd756ui.e75.tadmc@magna.augustmail.com>

Henry Law <lawshouse.public@btconnect.com> wrote:


> trying to do is to make n tests for the non-true-evaluation
> of n separate variables (he's presumably using that to infer their
> zero-lengthness and therefore their non-existence), issue a customised
> message for each one that is false, and then exit with a zero code if
> there was at least one error.  It's a fair question and I for one
> can't find a neater way of doing it.
> 
> Here's a traditional ASCII codepage version, which makes it easier to
> see:
> 
> 	# No strict, warnings - this is a fragment
> 	# Untested for the same reason
> 	# Probably crashes if $a or $b etc is undef
> 
> 	my $fail=0;
> 	unless ($a) {
> 		print "Error message for missing \$a\n"; 
> 		$fail=1;
> 	}
> 	unless ($b) {
> 		print "Different error message for missing \$b\n";
> 		$fail=1;
> 	}
> 	# Etc for n different variables; his n=4
> 	#
> 
> 	exit 0 if $fail;
> 
> 	print "We succeeded - they were all there\n";
> 
> Looks pretty clunky to me.  Maybe some "eval" construct would help?


No need for the full-monty eval evilness, the lesser evilness of
symrefs could be made to work.

If $a and $b are package variables then you could use symrefs,
but it would be better to have used a more appropriate data 
structure (a hash) rather than a bunch of individual scalars...


        my %msg = (
           a => "Error message for missing \$a\n",
           b => "Different error message for missing \$b\n"
          );

        my $fail=0;
        foreach my $var ( 'a', 'b' ) {
                no strict 'refs';
                next if $$var;
                print $msg{$var};
                $fail=1;
        }
        # Etc for n different variables; his n=4
        #

        exit 0 if $fail;

        print "We succeeded - they were all there\n";



-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Fri, 29 Apr 2005 22:01:11 GMT
From: Keith Thompson <kst-u@mib.org>
Subject: Re: multiples ifs
Message-Id: <lnk6mldyzc.fsf@nuthaus.mib.org>

Nikos <hackeras@gmail.com> writes:
> is there any better way to write this in Perl?
>
>     if( !$name )    { print font( {-size=>4, -color=>'Lime'},
> '     !<p>' );       $i=1; }
>     if( !$pray )    { print font( {-size=>4, -color=>'Lime'},  '
>   !<p>' );                $i=1; }
>     if( !$remark )  { print font( {-size=>4, -color=>'Lime'},  ' 
>      ?<p>' );  $i=1; }
>     if( !$email )   { print font( {-size=>4, -color=>'Lime'},
> '  email !<p>' );               $i=1; }
>     exit 0 if ($i!=0);

The long string literals aren't showing up properly in my newsreader.
I presume you're using Greek letters, but they're showing up as
nonsense strings of accented letters.

If you can limit your sample code to 7-bit ASCII plain text, it will
be easier to help you.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center             <*>  <http://users.sdsc.edu/~kst>
We must do something.  This is something.  Therefore, we must do this.


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

Date: Fri, 29 Apr 2005 21:10:25 +0100
From: "Simon Guest" <sguest@iee.org>
Subject: Windows Clipboard
Message-Id: <d4u4be$dbm$1@news6.svr.pol.co.uk>

I want to write to the windows clipboard from a PERL program.
Can anyone tell me how, please
SimonG 




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

Date: 29 Apr 2005 20:23:18 GMT
From: Christopher Nehren <apeiron+usenet@coitusmentis.info>
Subject: Re: Windows Clipboard
Message-Id: <slrnd755tm.1d39.apeiron+usenet@prophecy.dyndns.org>

On 2005-04-29, Simon Guest scribbled these
curious markings:
> I want to write to the windows clipboard from a PERL program.

It's Perl (the language) or perl (the program), but never PERL.

> Can anyone tell me how, please

Have you thought of looking at some of the Win32 modules on CPAN?

Best Regards,
Christopher Nehren
-- 
I abhor a system designed for the "user", if that word is a coded
pejorative meaning "stupid and unsophisticated". -- Ken Thompson
If you ask the wrong questions, you get answers like "42" and "God".
Unix is user friendly. However, it isn't idiot friendly.


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

Date: Fri, 29 Apr 2005 22:19:29 +0100
From: Henry Law <lawshouse.public@btconnect.com>
Subject: Re: Windows Clipboard
Message-Id: <o19571t0e1msruh9qtpstm247db5ql479r@4ax.com>

On Fri, 29 Apr 2005 21:10:25 +0100, "Simon Guest" <sguest@iee.org>
wrote:

>I want to write to the windows clipboard from a PERL program.
>Can anyone tell me how, please

Since you're running Windows it's 100:1 that you're using ActiveState
Perl.  If so then look in the HTML Help; towards the bottom on the LH
pane you'll find a module called Win32::Clipboard.  Care to guess what
it does?

Or open a command window and type 

	perldoc Win32::Clipboard

 ... but the HTML is easier.


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V10 Issue 8030
***************************************


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