--ljhfkffmkfccojdnapdg
Content-Type: text/plain; charset=us-ascii

beginners Digest 10 Nov 2003 18:46:24 -0000 Issue 1856

Topics (messages 55081 through 55110):

How best to grab SQL table names?
        55081 by: Dan Anderson
        55082 by: Dan Anderson
        55083 by: Tim Johnson
        55096 by: Rob Dixon
        55100 by: drieux

Re: Perl interface
        55084 by: A L
        55085 by: Dan Anderson
        55093 by: Remo Sanges

Is it Possible: Caching Perl Compilations
        55086 by: Dan Anderson
        55088 by: Jeff 'japhy' Pinyan
        55097 by: Rob Dixon

Re: Why would objects change
        55087 by: Jeff 'japhy' Pinyan
        55089 by: Dan Anderson

Curious Differences
        55090 by: ben.eisel.qmtechnologies.com

perl module to prevent auto registration scripts
        55091 by: Ramprasad A Padmanabhan
        55098 by: drieux
        55099 by: Paul Kraus
        55102 by: drieux

text modify
        55092 by: kof.mail.dk
        55094 by: Rob Dixon

Re: Module Object and sub module function
        55095 by: Rob Dixon

Died on open command
        55101 by: Ganesh Shankar
        55103 by: John W. Krahn
        55104 by: drieux
        55105 by: Guay Jean-Sébastien
        55106 by: John W. Krahn
        55108 by: drieux
        55109 by: Guay Jean-Sébastien
        55110 by: Guay Jean-Sébastien

Adding a printer remotely
        55107 by: Ned Cunningham

Administrivia:

To subscribe to the digest, e-mail:
        <[EMAIL PROTECTED]>

To unsubscribe from the digest, e-mail:
        <[EMAIL PROTECTED]>

To post to the list, e-mail:
        <[EMAIL PROTECTED]>


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

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55081.ezm"

Subject: How best to grab SQL table names?
Subject: How best to grab SQL table names?:[EMAIL PROTECTED]@!:
x-sender: Dan Anderson <[EMAIL PROTECTED]>
From:  Dan Anderson <[EMAIL PROTECTED]>
x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Message-Id: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Date: Sun, 09 Nov 2003 19:32:08 -0500

I've got a script that goes through SQL files and returns an array of
table names.  To find table names I use:

while ($_ = <FILE>) {
  if ($_ =~ m/CREATE.*TABLE/) {
    $_ = $';
    while (not ($_ =~ m/)//)) {  # match last parenthesis
       $_ .= <FILE>;
    }
    my $table_name = $`;
    $table_name = tr/ \t\n\r//d;
    return $table_name;
  }
}

My Programming Perl book says not to use $' $` and $&.  Is there a
better way to do this?

Thanks in advance,

Dan

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55082.ezm"

Subject: Re: How best to grab SQL table names?
Subject: Re: How best to grab SQL table names?:[EMAIL PROTECTED]@!:
x-sender: Dan Anderson <[EMAIL PROTECTED]>
From:  Dan Anderson <[EMAIL PROTECTED]>
x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Message-Id: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Date: Sun, 09 Nov 2003 19:39:27 -0500

oops that should be
while (not ($_ =~ m/\(//)) { # match the first parenthesis
and not:
while (not ($_ =~ m/)//)) {  # match last parenthesis

My apologies,

Dan

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55083.ezm"

MIME-Version: 1.0
Content-Type: text/plain;       charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Subject: RE: How best to grab SQL table names?
Subject: RE: How best to grab SQL table names?:[EMAIL PROTECTED]@!:
Date: Sun, 9 Nov 2003 16:58:56 -0800
x-sender: "Tim Johnson" <[EMAIL PROTECTED]>
From:  "Tim Johnson" <[EMAIL PROTECTED]>
x-receiver: "Dan Anderson" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
To:  "Dan Anderson" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>


I think you have an extra '/' in there for an m// operation.  Also,
maybe I'm just looking at this wrong, since I wasn't following the whole
thread, but wouldn't that be the same as this?

        while( $_ !~ /\(/ ){

which (purely my opinion) is a little easier to read?

-----Original Message-----
x-sender: Dan Anderson [mailto:[EMAIL PROTECTED]
From:  Dan Anderson [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 09, 2003 4:39 PM
x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Subject: Re: How best to grab SQL table names?
Subject: Re: How best to grab SQL table names?:[EMAIL PROTECTED]@!:

oops that should be
while (not ($_ =3D~ m/\(//)) { # match the first parenthesis and not:
while (not ($_ =3D~ m/)//)) {  # match last parenthesis

My apologies,

Dan

--
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]


--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55096.ezm"

x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
x-sender: "Rob Dixon" <[EMAIL PROTECTED]>
From:  "Rob Dixon" <[EMAIL PROTECTED]>
Subject: Re: How best to grab SQL table names?
Subject: Re: How best to grab SQL table names?:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 16:16:23 -0000

Dan Anderson wrote:
>
> I've got a script that goes through SQL files and returns an array of
> table names.  To find table names I use:
>
> while ($_ = <FILE>) {
>   if ($_ =~ m/CREATE.*TABLE/) {
>     $_ = $';
>     while (not ($_ =~ m/)//)) {  # match last parenthesis
>        $_ .= <FILE>;
>     }
>     my $table_name = $`;
>     $table_name = tr/ \t\n\r//d;
>     return $table_name;
>   }
> }
>
> My Programming Perl book says not to use $' $` and $&.  Is there a
> better way to do this?

Hi Dan.

Your code won't compile, so I'm guessing hard at what you're trying
to do. The best way to present a problem to the group is in plain
English, not in the form of non-funtional Perl that we have to
backtrack to understand what you meant.

I think you're trying to scan an SQL 'CREATE TABLE' statement, and
grab the name of the table and all of the field specifications.
Or something like that.

This isn't hard even without the 'forbidden' $' $` and $& but, even
though my belief is that people who avoid them are phobic, they
don't help here at all!

Explain your problem more clearly, with an example of your data,
and we'll be able to help.

Cheers,

Rob



--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55100.ezm"

Date: Mon, 10 Nov 2003 09:11:30 -0800
Subject: Re: How best to grab SQL table names?
Subject: Re: How best to grab SQL table names?:[EMAIL PROTECTED]@!:
Content-Type: text/plain; charset=US-ASCII; format=flowed
Mime-Version: 1.0 (Apple Message framework v552)
x-sender: drieux <[EMAIL PROTECTED]>
From:  drieux <[EMAIL PROTECTED]>
x-receiver: begin begin <[EMAIL PROTECTED]>
To:  begin begin <[EMAIL PROTECTED]>
Content-Transfer-Encoding: 7bit
Message-Id: <[EMAIL PROTECTED]>


On Sunday, Nov 9, 2003, at 16:32 US/Pacific, Dan Anderson wrote:
[..]
>
> while ($_ = <FILE>) {
>   if ($_ =~ m/CREATE.*TABLE/) {
>     $_ = $';
>     while (not ($_ =~ m/)//)) {  # match last parenthesis
>        $_ .= <FILE>;
>     }
>     my $table_name = $`;
>     $table_name = tr/ \t\n\r//d;
>     return $table_name;
>   }
> }
>
> My Programming Perl book says not to use $' $` and $&.  Is there a
> better way to do this?

well a bit of it has to do with how the Perl Regular Expression
Engine works, the other part has to do with making your code a
bit more readable, and maintainable. The use of the $' and $`
as the "perldoc perlvar" pages will tell you imposes a considerable
performance penalty.

right, a bit of clean up of the code:

        while (<FILE>) { # it will set the line to $_ by default
                # cut off everything BEFORE our 'pattern'
                if ( s/.*CREATE.*TABLE//)
                {
                        chomp;  # remove any 'newline tokens'
                        my $line = $_ ; # save off what we have
                        # read until we have come to the closing paren
                        while ( $line !~ m/\)/ ) {
                                $_ = <FILE>;
                                chomp;
                                $line .= $_;    
                        }
                        # we will either have seen that last paren, or it did not exist
                        ( my $table_name = $line ) =~ s/.*\)//;
                $table_name = tr/ \t\n\r//d;
                        return $table_name;
                
                } # found opening line
        }# end while loop

being a bit of a tight translation.

ciao
drieux

---


--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55084.ezm"

Date: Sun, 9 Nov 2003 18:19:06 -0800 (PST)
x-sender: A L <[EMAIL PROTECTED]>
From:  A L <[EMAIL PROTECTED]>
Subject: Re: Perl interface
Subject: Re: Perl interface:[EMAIL PROTECTED]@!:
x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-1884188425-1068430746=:38008"

--0-1884188425-1068430746=:38008
Content-Type: text/plain; charset=us-ascii



yomna el-tawil <[EMAIL PROTECTED]> wrote: 
Hi all, i'm a new user for PERL, i even didn't start
using it since i'ven't got the editor yet...
I wanted to ask if it's possible to make a user
friendly interface using PERL, as for example the
Dialogs or forms in the Visual C++. 

----Yes (check out CGI and Perl/tk).

If not,, is it
possible to take the output from perl and make the
interface using a different language, even a web based
program, as for example the asp or asp. net????

-----I don't know; maybe someone else can answer this.  I am unsure of your question.


One more question: If anyone heard about BioPerl, is
it more efficient to use it instead of PERL to make
pattern matching for the genetic code?
Thank you for being concerened and please somebody
reply soooooooooooooooooooooooooooooooooooooooon :) 
Thank you all

-----Cant' tell you because haven't used BioPerl, but it's quite efficient enough to 
use Perl alone to make pattern matching for the genetic  code, in my point point of 
view what little I know.  But, it seems like BioPerl is a module for Perl, and it 
seems to require some basic knowledge of Perl before you can use BioPerl.  It might be 
better to understand Perl a little bit and decide whether or not you want to use 
BioPerl.  

I just read James's reply after having written this reply.  I'm glad to know that I'm 
not too off the mark.  Just thought that I should let the community know I am 
learning;)




---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
--0-1884188425-1068430746=:38008--

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55085.ezm"

Subject: Re: Perl interface
Subject: Re: Perl interface:[EMAIL PROTECTED]@!:
x-sender: Dan Anderson <[EMAIL PROTECTED]>
From:  Dan Anderson <[EMAIL PROTECTED]>
x-receiver: yomna el-tawil <[EMAIL PROTECTED]>
To:  yomna el-tawil <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Message-Id: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Date: Sun, 09 Nov 2003 22:00:50 -0500

Go to safari.oreilly.com .  Get one of their 14 day trial subscriptions
and the book Learning Perl or Learning Perl for Windows (something like
that).  If you get through it and understand it pick up the book
Learning Perl for Bioinformatics or one of the other ones there.

-Dan

On Sun, 2003-11-09 at 12:14, yomna el-tawil wrote:
> Hi all, i'm a new user for PERL, i even didn't start
> using it since i'ven't got the editor yet...
> I wanted to ask if it's possible to make a user
> friendly interface using PERL, as for example the
> Dialogs or forms in the Visual C++. If not,, is it
> possible to take the output from perl and make the
> interface using a different language, even a web based
> program, as for example the asp or asp. net????
> One more question: If anyone heard about BioPerl, is
> it more efficient to use it instead of PERL to make
> pattern matching for the genetic code?
> Thank you for being concerened and please somebody
> reply soooooooooooooooooooooooooooooooooooooooon :) 
> Thank you all
> 
> ________________________________________________________________________
> Want to chat instantly with your online friends?  Get the FREE Yahoo!
> Messenger http://mail.messenger.yahoo.co.uk

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55093.ezm"

x-sender: "Remo Sanges" <[EMAIL PROTECTED]>
From:  "Remo Sanges" <[EMAIL PROTECTED]>
x-receiver: "yomna el-tawil" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
To:  "yomna el-tawil" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Subject: Re: Perl interface
Subject: Re: Perl interface:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 11:33:49 +0100
MIME-Version: 1.0
Content-Type: text/plain;       charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

----- Original Message ----- 
x-sender: "yomna el-tawil" <[EMAIL PROTECTED]>
From:  "yomna el-tawil" <[EMAIL PROTECTED]>
x-receiver: <[EMAIL PROTECTED]>
To:  <[EMAIL PROTECTED]>
Sent: Sunday, November 09, 2003 6:14 PM
Subject: Perl interface
Subject: Perl interface:[EMAIL PROTECTED]@!:


>..............If anyone heard about BioPerl, is
> it more efficient to use it instead of PERL to make
> pattern matching for the genetic code?
> Thank you for being concerened and please somebody
> reply soooooooooooooooooooooooooooooooooooooooon :) 
> Thank you all

BioPerl is a collection of module to manage biological sequences,
annotation, parse the output of the standard programs used
in this field and so on. 
You can find very useful, in your situation, its management of
very large sequences with a very fine system of IO.
In general pattern matching is not different between PERL and BioPerl,
but with a better IO you can use BioPerl to manage sequences,
some biological toolkit like EMBOSS (www.emboss.org) in order
to analize your sequences and then parsing the outputs with BioPerl
that have a lot of parser.
In this way you remain into the higher standard of biological community
and you have no to worry about memory usage, dimension of file and
so on.
Take a look at:
http://www.bioperl.org/Core/Latest/bptutorial.html
and then if you want more
http://doc.bioperl.org/

Remo

_____________________________________
Remo Sanges - Ph.D. Student
BioGeM - IGB
Gene Expression & Sequencing Core Lab
Via Pietro Castellino 111
80131 Naples - Italy
Tel:+390816132303 - Fax:+390816132262
[EMAIL PROTECTED] - [EMAIL PROTECTED]
_____________________________________



--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55086.ezm"

Subject: Is it Possible: Caching Perl Compilations
Subject: Is it Possible: Caching Perl Compilations:[EMAIL PROTECTED]@!:
x-sender: Dan Anderson <[EMAIL PROTECTED]>
From:  Dan Anderson <[EMAIL PROTECTED]>
x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Message-Id: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Date: Sun, 09 Nov 2003 22:38:17 -0500

Is it possible to cache Perl compilations on a web server so that it
runs faster? 

Thanks in advance,

-Dan

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55088.ezm"

Date: Sun, 9 Nov 2003 22:47:46 -0500 (EST)
x-sender: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]>
From:  Jeff 'japhy' Pinyan <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
x-receiver: Dan Anderson <[EMAIL PROTECTED]>
To:  Dan Anderson <[EMAIL PROTECTED]>
cc: [EMAIL PROTECTED]
Subject: Re: Is it Possible: Caching Perl Compilations
Subject: Re: Is it Possible: Caching Perl Compilations:[EMAIL PROTECTED]@!:
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Nov 9, Dan Anderson said:

>Is it possible to cache Perl compilations on a web server so that it
>runs faster?

Yes, it's called mod_perl, and it's a module for the Apache web server.
See the Apache web site (http://www.apache.org/).

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55097.ezm"

x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
x-sender: "Rob Dixon" <[EMAIL PROTECTED]>
From:  "Rob Dixon" <[EMAIL PROTECTED]>
Subject: Re: Is it Possible: Caching Perl Compilations
Subject: Re: Is it Possible: Caching Perl Compilations:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 16:21:35 -0000

Dan Anderson wrote:
>
> Is it possible to cache Perl compilations on a web server so that it
> runs faster?

Hi Dan.

It depends why you're compiling at run time. Something like

  my $sub = eval 'sub { 9 + 9 }';

  print $sub->(), "\n";

will stay compiled as long as you have $sub as a reference.
Obviously you can build the 'eval'ed string how you like before
it's compiled.

HTH,

Rob



--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55087.ezm"

Date: Sun, 9 Nov 2003 22:46:39 -0500 (EST)
x-sender: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]>
From:  Jeff 'japhy' Pinyan <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
x-receiver: Dan Anderson <[EMAIL PROTECTED]>
To:  Dan Anderson <[EMAIL PROTECTED]>
cc: [EMAIL PROTECTED]
Subject: Re: Why would objects change
Subject: Re: Why would objects change:[EMAIL PROTECTED]@!:
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Nov 9, Dan Anderson said:

>I had a function that blessed a Hash into it's class.  Oddly, I started
>having problems.  On dumping the hash I found it had been blessed into a
>part of the hash.
>
>bless {foo => "bar"}, "class";
>became
>bless {foo => "bar"}, "bar";
>when the modules constructor was called by another module.

I have a feeling you've done

  Module::new(args...)

instead of

  Module->new(args...)

The first way is erroneous.  The second way is correct.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55089.ezm"

Subject: Re: Why would objects change
Subject: Re: Why would objects change:[EMAIL PROTECTED]@!:
x-sender: Dan Anderson <[EMAIL PROTECTED]>
From:  Dan Anderson <[EMAIL PROTECTED]>
x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Message-Id: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Date: Sun, 09 Nov 2003 23:01:27 -0500

> I have a feeling you've done
> 
>   Module::new(args...)
> 
> instead of
> 
>   Module->new(args...)
> 
> The first way is erroneous.  The second way is correct.

Yes, that's it.  Thank you.

Dan

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55090.ezm"

x-sender: [EMAIL PROTECTED]
From:  [EMAIL PROTECTED]
x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Subject: Curious Differences
Subject: Curious Differences:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 17:42:12 +1100
MIME-Version: 1.0
Content-Type: text/plain

I'm getting different results from the same expression on two different machines.

Systems
-------
SunOS qmprod 5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-4
SunOS prd-s01 5.9 Generic_112233-07 sun4u sparc SUNW,Sun-Fire-880

Perl Instances
--------------
prd-s01: perl 5.8.0 ; perl 5.004_05 ; perl 5.6.1 ; perl 5.00503
qmprod: perl 5.004_01 
windowsmachine: perl v5.6.1


Description
-----------
There's a peculiar difference between the perl's on qmprod and prd-s01. 
The program: print join('-', 'a', ('x' =~ /y/), 'b'), "\n"; produces different output 
on the two machines. It seems the qmprod perl thinks 'a', ('x' =~ /y/), 'b' is 
equivalent to 'a', '', 'b' and the prd-s01 perl(s) to 'a', 'b' or, maybe, 'a',,'b'

Can anyone shed some light on this matter?

Thanks for your help,

- Ben Eisel
OutboundAppend=

This message and any attachment is confidential and may be privileged or otherwise 
protected from disclosure.  If you have received it by mistake please let us know by 
reply and then delete it from your system; you should not copy the message or disclose 
its contents to anyone.


--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55091.ezm"

x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Date: Mon, 10 Nov 2003 12:55:06 +0530
x-sender: Ramprasad A Padmanabhan <[EMAIL PROTECTED]>
From:  Ramprasad A Padmanabhan <[EMAIL PROTECTED]>
MIME-Version: 1.0
Subject: perl module to prevent auto registration scripts
Subject: perl module to prevent auto registration scripts:[EMAIL PROTECTED]@!:
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hello all,

    I am writing a web based registration module. I want to prevent 
people writing automated scripts ( like using lwp ) and auto register

Something like what yahoo does , put a number in a jpg image and ask the 
user to fill in the number , which ( I think ?)  a program can not do

Any pointers  to a CPAN module I can use

Thanks
Ram


--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55098.ezm"

Date: Mon, 10 Nov 2003 08:52:46 -0800
Subject: Re: perl module to prevent auto registration scripts
Subject: Re: perl module to prevent auto registration scripts:[EMAIL PROTECTED]@!:
Content-Type: text/plain; charset=US-ASCII; format=flowed
Mime-Version: 1.0 (Apple Message framework v552)
x-sender: drieux <[EMAIL PROTECTED]>
From:  drieux <[EMAIL PROTECTED]>
x-receiver: begin begin <[EMAIL PROTECTED]>
To:  begin begin <[EMAIL PROTECTED]>
Content-Transfer-Encoding: 7bit
Message-Id: <[EMAIL PROTECTED]>


On Sunday, Nov 9, 2003, at 23:25 US/Pacific, Ramprasad A Padmanabhan 
wrote:
[..]
>    I am writing a web based registration module. I want to prevent
> people writing automated scripts ( like using lwp ) and auto register
[..]

The recent discussion about how Google has attempted
to control access to it's site has shown that this is
really not as easy as it sounds.

IF one checks for the 'browser type', then the person
using lwp will need to 'spoof' an acceptable $ua->agent($correct_type);
prior to calling your web-site.

You could try the 'check to see if one can set a cookie'
but that would be problematic, since again the coder with
lwp could deal with that problem.

In essence you are trying to solve the turing test by
establishing that the thing you are 'talking with' is
actually a human and not an automaton.


ciao
drieux

---


--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55099.ezm"

Reply-To: <[EMAIL PROTECTED]>
x-sender: "Paul Kraus" <[EMAIL PROTECTED]>
From:  "Paul Kraus" <[EMAIL PROTECTED]>
x-receiver: "'drieux'" <[EMAIL PROTECTED]>,     "'begin begin'" <[EMAIL PROTECTED]>
To:  "'drieux'" <[EMAIL PROTECTED]>,    "'begin begin'" <[EMAIL PROTECTED]>
Subject: RE: perl module to prevent auto registration scripts
Subject: RE: perl module to prevent auto registration scripts:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 11:59:46 -0500
MIME-Version: 1.0
Content-Type: text/plain;       charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Can't you add one of those image words that you have to type in.

Also why do this. A website provides content. Its not any of the
providers business how I view it or what I do with it afterwards.

Paul

-----Original Message-----
x-sender: drieux [mailto:[EMAIL PROTECTED] 
From:  drieux [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 10, 2003 11:53 AM
x-receiver: begin begin
To:  begin begin
Subject: Re: perl module to prevent auto registration scripts
Subject: Re: perl module to prevent auto registration scripts:[EMAIL PROTECTED]@!:



On Sunday, Nov 9, 2003, at 23:25 US/Pacific, Ramprasad A Padmanabhan 
wrote:
[..]
>    I am writing a web based registration module. I want to prevent 
> people writing automated scripts ( like using lwp ) and auto register
[..]

The recent discussion about how Google has attempted
to control access to it's site has shown that this is
really not as easy as it sounds.

IF one checks for the 'browser type', then the person
using lwp will need to 'spoof' an acceptable $ua->agent($correct_type);
prior to calling your web-site.

You could try the 'check to see if one can set a cookie'
but that would be problematic, since again the coder with
lwp could deal with that problem.

In essence you are trying to solve the turing test by establishing that
the thing you are 'talking with' is actually a human and not an
automaton.


ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55102.ezm"

Date: Mon, 10 Nov 2003 09:29:59 -0800
Subject: Re: perl module to prevent auto registration scripts
Subject: Re: perl module to prevent auto registration scripts:[EMAIL PROTECTED]@!:
Content-Type: text/plain; charset=US-ASCII; format=flowed
Mime-Version: 1.0 (Apple Message framework v552)
x-sender: drieux <[EMAIL PROTECTED]>
From:  drieux <[EMAIL PROTECTED]>
x-receiver: begin begin <[EMAIL PROTECTED]>
To:  begin begin <[EMAIL PROTECTED]>
Content-Transfer-Encoding: 7bit
Message-Id: <[EMAIL PROTECTED]>


On Monday, Nov 10, 2003, at 08:59 US/Pacific, Paul Kraus wrote:
[..]
> Also why do this. A website provides content. Its not any of the
> providers business how I view it or what I do with it afterwards.

I am not the person to answer the 'why' for doing silly things,
there is probably someone in the 'legal' and/or 'marketting'
department who comes up with the 'hey what if we did...' sets
of requirements. There is also the problem with 'copyright laws'
and that 'fair use' is one thing, but beyond that, one has embarked
upon merely plagarism and 'theft of intellectual property'.

The Yahoo image trick has the complication for some of my
optically challenged friends, in that they can not always
pick out the 'number' if the 'hue shifts' are not smack dab
in the middle of their limited RGB processing. Those folks
do not 'dress badly' because they are 'fashion challenged'
they do so because they can not tell that certain hues in
the visual spectrum, are, well GARISH TOGETHER on planet earth.
{ probably on their home planet the atmosphere protects them
from this problem, since the light refracted from their sun
does not provide the full range as we get here. but should
we be prejudiced against the non-terran? I mean, how would
we look in their native atmosphere? The question

        what is the colour of the sky in your world?

is not merely a pejorative you know. }

ciao
drieux

---


--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55092.ezm"

x-sender: [EMAIL PROTECTED]
From:  [EMAIL PROTECTED]
x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Subject: text modify
Subject: text modify:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 10:27:56 +0100
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=iso-8859-1
Message-Id: <[EMAIL PROTECTED]>

Hi,

I have some data column based data I want to modify a bit.

0065 663 517 046  0 1485
0065 663 517 046  3 1500
0065 663 517 046  5 1882
0120 620 515 919  0 1485
0120 620 515 919  6 1816
0120 620 515 919  8 2136

I would like to add a counter to column 5 to fill out the gaps in between e=
g. 0 and 10 - but doing so without changing the other columns values until=
 column 4 itself changes values

My result would look like:
0065 663 517 046  0 1485
0065 663 517 046  1 1485
0065 663 517 046  2 1485
0065 663 517 046  3 1500
0065 663 517 046  4 1500
0065 663 517 046  5 1882
0120 620 515 919  0 1485
0120 620 515 919  1 1485
0120 620 515 919  2 1485
0120 620 515 919  3 1485
0120 620 515 919  4 1485
0120 620 515 919  5 1485
0120 620 515 919  6 1816
0120 620 515 919  7 1816
0120 620 515 919  8 1485

My initial idea was to compare (in a while loop) the value in column 4 with=
 the previous line.
However, I cannot figure out how to save the "comparing" variable.

Any ideas how to get started on this?
Thanks

Cheers,
Jakob

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55094.ezm"

x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
x-sender: "Rob Dixon" <[EMAIL PROTECTED]>
From:  "Rob Dixon" <[EMAIL PROTECTED]>
Subject: Re: text modify
Subject: Re: text modify:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 11:22:24 -0000

<[EMAIL PROTECTED]> wrote:
>
> I have some data column based data I want to modify a bit.
>
> 0065 663 517 046  0 1485
> 0065 663 517 046  3 1500
> 0065 663 517 046  5 1882
> 0120 620 515 919  0 1485
> 0120 620 515 919  6 1816
> 0120 620 515 919  8 2136
>
> I would like to add a counter to column 5 to fill out the gaps
> in between e.g. 0 and 10 - but doing so without changing the
> other columns values until column 4 itself changes values
>
> My result would look like:
> 0065 663 517 046  0 1485
> 0065 663 517 046  1 1485
> 0065 663 517 046  2 1485
> 0065 663 517 046  3 1500
> 0065 663 517 046  4 1500
> 0065 663 517 046  5 1882
> 0120 620 515 919  0 1485
> 0120 620 515 919  1 1485
> 0120 620 515 919  2 1485
> 0120 620 515 919  3 1485
> 0120 620 515 919  4 1485
> 0120 620 515 919  5 1485
> 0120 620 515 919  6 1816
> 0120 620 515 919  7 1816
> 0120 620 515 919  8 1485
>
> My initial idea was to compare (in a while loop) the value in
> column 4 with the previous line. However, I cannot figure out
> how to save the "comparing" variable.
>
> Any ideas how to get started on this?
> Thanks

I think the program below will do what you want.

Cheers,

Rob





use strict;
use warnings;

my @last_data;

while (<DATA>) {

  my @data = split;

  if (@last_data and $last_data[3] == $data[3]) {
    while (++$last_data[4] < $data[4]) {
      printf "%04d %03d %03d %03d %2d %04d\n", @last_data;
    }
  }

  printf "%04d %03d %03d %03d %2d %04d\n", @data;

  @last_data = @data;
}


__DATA__
0065 663 517 046  0 1485
0065 663 517 046  3 1500
0065 663 517 046  5 1882
0120 620 515 919  0 1485
0120 620 515 919  6 1816
0120 620 515 919  8 2136

**OUTPUT**

0065 663 517 046  0 1485
0065 663 517 046  1 1485
0065 663 517 046  2 1485
0065 663 517 046  3 1500
0065 663 517 046  4 1500
0065 663 517 046  5 1882
0120 620 515 919  0 1485
0120 620 515 919  1 1485
0120 620 515 919  2 1485
0120 620 515 919  3 1485
0120 620 515 919  4 1485
0120 620 515 919  5 1485
0120 620 515 919  6 1816
0120 620 515 919  7 1816
0120 620 515 919  8 2136



--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55095.ezm"

x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
x-sender: "Rob Dixon" <[EMAIL PROTECTED]>
From:  "Rob Dixon" <[EMAIL PROTECTED]>
Subject: Re: Module Object and sub module function
Subject: Re: Module Object and sub module function:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 16:05:32 -0000

R. Joseph Newton wrote:
>
> Dan Muey wrote:
>
> >
> >
> > Basically I use the ParentName's $obj inside my functions
> > and they are expecting it as the first arg.
> >
> > $obj->MyModule::function($arg); would be the coolest way
> > (leaving my functions as sub function instead of sub
> > NameSpace::Evil::function)
> >
> > Is this possible or am I just batty!?
> >
>
> Absolutely on the mark!  Bravo!
>
> Then catch it in the function with:
> my $self = shift;

[snip]

Do you mean what you say Joseph?

  $obj->MyModule::function($arg)

Whether MyModule is the base class or the subclass it goes
against all principles of inheritance. $obj knows its own
class, and a call to $obj->function() will pick the correct
definitian of function() according to that class. Fully
qualifying the function identifier makes nonsense of calling
it via an object.

Or am I missing something?

Cheers,

Rob




--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55101.ezm"

Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="iso-8859-1"
MIME-Version: 1.0
x-sender: "Ganesh Shankar" <[EMAIL PROTECTED]>
From:  "Ganesh Shankar" <[EMAIL PROTECTED]>
x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Date: Mon, 10 Nov 2003 09:11:56 -0800
Subject: Died on open command
Subject: Died on open command:[EMAIL PROTECTED]@!:
Message-Id: <[EMAIL PROTECTED]>

Hello all,
I'm starting to learn perl to convert files between different
bioinformatics programs.  I'm aware of bioperl but want to learn some
basic perl before using those modules.  

1) The script is in the same directory as the input folder, so open
should be able to find it.

2) The open input folder part works because I get a I get a list of the
files.

3) The whole program worked on a single file, but died when I tried to
convert it to handle a whole directory as input.

4) I'm developing on a Windows machine, so I think setting file
permissions are unnecessary, right?


Here's the code snippet:

use warnings;
use strict;

my @files = ();
my $folder = 'input';
# Open the input folder
unless (opendir(FOLDER, $folder)) {
        print "Cannot open folder $folder!\n\n";
        exit;
}

#read the contents of the folder (files and subfolders)
@files = readdir(FOLDER);

#Close the folder
print "\n\n Here are the files in the folder\n";
#print out the filenames, one per line
print join( "\n", @files), "\n";
closedir(FOLDER);

foreach my $seqfilename (@files){
        [EMAIL PROTECTED] = @_;
        $seqfilename = '';
        open (TXTFILE,"<$seqfilename") or die $!;
close TXTFILE;


my @seqelements = <TXTFILE>;

..........goes on from here
I know the conversion routine works, because it worked
when I specified a single file.


Thanks for your help in advance,
Ganesh
-- 
  Ganesh Shankar
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - A fast, anti-spam email service.

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55103.ezm"

x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Date: Mon, 10 Nov 2003 09:30:06 -0800
x-sender: "John W. Krahn" <[EMAIL PROTECTED]>
From:  "John W. Krahn" <[EMAIL PROTECTED]>
MIME-Version: 1.0
Subject: Re: Died on open command
Subject: Re: Died on open command:[EMAIL PROTECTED]@!:
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Ganesh Shankar wrote:
> 
> Hello all,

Hello,

> I'm starting to learn perl to convert files between different
> bioinformatics programs.  I'm aware of bioperl but want to learn some
> basic perl before using those modules.
> 
> 1) The script is in the same directory as the input folder, so open
> should be able to find it.
> 
> 2) The open input folder part works because I get a I get a list of the
> files.
> 
> 3) The whole program worked on a single file, but died when I tried to
> convert it to handle a whole directory as input.
> 
> 4) I'm developing on a Windows machine, so I think setting file
> permissions are unnecessary, right?

This problem is described is explained in the documentation for the
readdir function.

perldoc -f readdir
[snip]
       If you're planning to filetest the return values
       out of a `readdir', you'd better prepend the
       directory in question.  Otherwise, because we
       didn't `chdir' there, it would have been testing
       the wrong file.


> Here's the code snippet:
> 
> use warnings;
> use strict;
> 
> my @files = ();
> my $folder = 'input';
> # Open the input folder
> unless (opendir(FOLDER, $folder)) {
>         print "Cannot open folder $folder!\n\n";
>         exit;
> }
> 
> #read the contents of the folder (files and subfolders)
> @files = readdir(FOLDER);
> 
> #Close the folder
> print "\n\n Here are the files in the folder\n";
> #print out the filenames, one per line
> print join( "\n", @files), "\n";
> closedir(FOLDER);
> 
> foreach my $seqfilename (@files){
>         [EMAIL PROTECTED] = @_;
>         $seqfilename = '';
>         open (TXTFILE,"<$seqfilename") or die $!;

    open (TXTFILE,"<$folder/$seqfilename") or die $!;


> close TXTFILE;
> 
> my @seqelements = <TXTFILE>;
> 
> ...........goes on from here
> I know the conversion routine works, because it worked
> when I specified a single file.



John
-- 
use Perl;
program
fulfillment

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55104.ezm"

Date: Mon, 10 Nov 2003 10:13:56 -0800
Subject: Re: Died on open command
Subject: Re: Died on open command:[EMAIL PROTECTED]@!:
Content-Type: text/plain; charset=US-ASCII; format=flowed
Mime-Version: 1.0 (Apple Message framework v552)
x-sender: drieux <[EMAIL PROTECTED]>
From:  drieux <[EMAIL PROTECTED]>
x-receiver: begin begin <[EMAIL PROTECTED]>
To:  begin begin <[EMAIL PROTECTED]>
Content-Transfer-Encoding: 7bit
Message-Id: <[EMAIL PROTECTED]>


On Monday, Nov 10, 2003, at 09:30 US/Pacific, John W. Krahn wrote:
> Ganesh Shankar wrote:
[..]
>> 4) I'm developing on a Windows machine, so I think setting file
>> permissions are unnecessary, right?
>
> This problem is described is explained in the documentation for the
> readdir function.
>
> perldoc -f readdir
> [snip]
>        If you're planning to filetest the return values
>        out of a `readdir', you'd better prepend the
>        directory in question.  Otherwise, because we
>        didn't `chdir' there, it would have been testing
>        the wrong file.
[..]
>> foreach my $seqfilename (@files){
>>         [EMAIL PROTECTED] = @_;
>>         $seqfilename = '';
>>         open (TXTFILE,"<$seqfilename") or die $!;
>
>     open (TXTFILE,"<$folder/$seqfilename") or die $!;

john,

I agree with your basic solution, but since he will
be doing his development in Windows, shouldn't that
be 'file system neutral'? hence not using the unix
separator "/" between the directory component and the filename 
component?

Hence that the OP should do the

        chdir($folder);

since he has already established that the directory existed
when collecting up the list of files for 'input', and this
should be done prior to doing the

        foreach my $seqfilename (@files){
                open (TXTFILE,"<$seqfilename") or die $!;
                ...
        }

so that the code will 'work' on more OS's.

ciao
drieux

---


--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55105.ezm"

Date: Mon, 10 Nov 2003 13:17:37 -0500
x-sender: =?iso-8859-1?Q?Guay_Jean-S=E9bastien?= <[EMAIL PROTECTED]>
From:  =?iso-8859-1?Q?Guay_Jean-S=E9bastien?= <[EMAIL PROTECTED]>
Subject: RE: Died on open command
Subject: RE: Died on open command:[EMAIL PROTECTED]@!:
x-receiver: 'drieux' <[EMAIL PROTECTED]>, 'Perl-Beginners' <[EMAIL PROTECTED]>
To:  'drieux' <[EMAIL PROTECTED]>, 'Perl-Beginners' <[EMAIL PROTECTED]>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: quoted-printable

> I agree with your basic solution, but since he will
> be doing his development in Windows, shouldn't that
> be 'file system neutral'? hence not using the unix
> separator "/" between the directory component and the filename=20
> component?

In a move to simplify porting of scripts (and save the sanity of =
Windows
Perl coders), ActiveState made it so that the "/" path separator works =
on
Windows too, and is converted internally. We don't have to think about =
it.
And it's easier than trying to remember to escape backslashes, too. :-)

So the solution proposed will work fine on Unix, Windows, MacOSX, etc.

Just FYI.

J-S

_____________________________________________________
Jean-S=E9bastien Guay
-- Conseiller technique - Administration
-- (514) 522-9800 #4840
-- [EMAIL PROTECTED]

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55106.ezm"

x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Date: Mon, 10 Nov 2003 10:35:33 -0800
x-sender: "John W. Krahn" <[EMAIL PROTECTED]>
From:  "John W. Krahn" <[EMAIL PROTECTED]>
MIME-Version: 1.0
Subject: Re: Died on open command
Subject: Re: Died on open command:[EMAIL PROTECTED]@!:
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Guay jean-Sébastien wrote:
> 
> > I agree with your basic solution, but since he will
> > be doing his development in Windows, shouldn't that
> > be 'file system neutral'? hence not using the unix
> > separator "/" between the directory component and the filename
> > component?
> 
> In a move to simplify porting of scripts (and save the sanity of Windows
> Perl coders), ActiveState made it so that the "/" path separator works on
> Windows too, and is converted internally. We don't have to think about it.
> And it's easier than trying to remember to escape backslashes, too. :-)
> 
> So the solution proposed will work fine on Unix, Windows, MacOSX, etc.
> 
> Just FYI.

It has nothing to do with what ActiveState did or didn't do.  The
DOS/Windows command interpreter (command.com/cmd.exe) uses '\' as the
path separator however the operating system itself is able to use '/' as
the path separator.


John
-- 
use Perl;
program
fulfillment

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55108.ezm"

Date: Mon, 10 Nov 2003 10:40:21 -0800
Subject: Re: Died on open command
Subject: Re: Died on open command:[EMAIL PROTECTED]@!:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Mime-Version: 1.0 (Apple Message framework v552)
x-sender: drieux <[EMAIL PROTECTED]>
From:  drieux <[EMAIL PROTECTED]>
x-receiver: begin begin <[EMAIL PROTECTED]>
To:  begin begin <[EMAIL PROTECTED]>
Content-Transfer-Encoding: quoted-printable
Message-Id: <[EMAIL PROTECTED]>


On Monday, Nov 10, 2003, at 10:17 US/Pacific, Guay Jean-S=E9bastien =
wrote:
[..]
>> I agree with your basic solution, but since he will
>> be doing his development in Windows, shouldn't that
>> be 'file system neutral'? hence not using the unix
>> separator "/" between the directory component and the filename
>> component?
>
> In a move to simplify porting of scripts (and save the sanity
> of Windows Perl coders), ActiveState made it so that the "/" path
> separator works on Windows too, and is converted internally.
> We don't have to think about it. And it's easier than trying to
> remember to escape backslashes, too. :-)

Props for doing the Right Thing!

This will clearly help moi as I dodder around from
OS to OS, and whine about 'the good old days'.... 8-)

Which version of Perl from ActiveState did this show up in?

ciao
drieux

---


--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55109.ezm"

Date: Mon, 10 Nov 2003 13:39:27 -0500
x-sender: =?iso-8859-1?Q?Guay_Jean-S=E9bastien?= <[EMAIL PROTECTED]>
From:  =?iso-8859-1?Q?Guay_Jean-S=E9bastien?= <[EMAIL PROTECTED]>
Subject: RE: Died on open command
Subject: RE: Died on open command:[EMAIL PROTECTED]@!:
x-receiver: "'John W. Krahn'" <[EMAIL PROTECTED]>, 'Perl-Beginners' <[EMAIL PROTECTED]>
To:  "'John W. Krahn'" <[EMAIL PROTECTED]>, 'Perl-Beginners' <[EMAIL PROTECTED]>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: quoted-printable

> It has nothing to do with what ActiveState did or didn't do.  The
> DOS/Windows command interpreter (command.com/cmd.exe) uses '\' as the
> path separator however the operating system itself is able to use '/' =
as
> the path separator.

Sorry, I just tried it on my machine here (NT4), and doing

cd winnt/system32

from the C: directory gets me into the C:\winnt directory, whereas =
doing=20

cd winnt\system32

gets me into the C:\winnt\system32 directory, as it should. I tried it
before I sent the mail.

Now perhaps the cmd.exe for Win2000 and up does what you describe. But =
since
opening a file with slashes in its path works in perl even on my =
machine,
where using slashes at the prompt doesn't work, I would say ActiveState =
had
something to do with it. Perhaps they just ironed out some of the
differences between the versions of cmd.exe...

Anyways, it's irrelevant, it works, so let's just use it, regardless of
who's to blame (err, thank).

J-S

_____________________________________________________
Jean-S=E9bastien Guay
-- Conseiller technique - Administration
-- (514) 522-9800 #4840
-- [EMAIL PROTECTED]

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55110.ezm"

Date: Mon, 10 Nov 2003 13:42:57 -0500
x-sender: =?iso-8859-1?Q?Guay_Jean-S=E9bastien?= <[EMAIL PROTECTED]>
From:  =?iso-8859-1?Q?Guay_Jean-S=E9bastien?= <[EMAIL PROTECTED]>
Subject: RE: Died on open command
Subject: RE: Died on open command:[EMAIL PROTECTED]@!:
x-receiver: "'John W. Krahn'" <[EMAIL PROTECTED]>, 'Perl-Beginners' <[EMAIL PROTECTED]>
To:  "'John W. Krahn'" <[EMAIL PROTECTED]>, 'Perl-Beginners' <[EMAIL PROTECTED]>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: quoted-printable

> It has nothing to do with what ActiveState did or didn't do.  The
> DOS/Windows command interpreter (command.com/cmd.exe) uses '\' as the
> path separator however the operating system itself is able to use '/' =
as
> the path separator.

Err, just noticed I shouldn't have read so quick...=20

Still, since cmd.exe goes to great lengths to prevent us from using the
slash, forcing the backslash onto us, I thank ActiveState for not going =
the
same way. :-)

Thanks for rectifying things.

J-S

_____________________________________________________
Jean-S=E9bastien Guay
-- Conseiller technique - Administration
-- (514) 522-9800 #4840
-- [EMAIL PROTECTED]

--ljhfkffmkfccojdnapdg
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55107.ezm"

MIME-Version: 1.0
Content-Type: text/plain;       charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Subject: Adding a printer remotely
Subject: Adding a printer remotely:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 13:38:54 -0500
x-sender: "Ned Cunningham" <[EMAIL PROTECTED]>
From:  "Ned Cunningham" <[EMAIL PROTECTED]>
x-receiver: <[EMAIL PROTECTED]>
To:  <[EMAIL PROTECTED]>

Hello,

Does anyone know how to add a printer in Perl remotely on a NT 4 system?

I have been googling for a while and found some info about WSH and =
cscript, but it doesn't work on NT. (or I haven't figured it out yet).

Please advise any possibilities that you might have.


Ned Cunningham
POS Systems Development
Monro Muffler Brake
200 Holleder Parkway
Rochester, NY 14615
(585) 647-6400 ext. 310
[EMAIL PROTECTED]

--ljhfkffmkfccojdnapdg--



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to