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

beginners Digest 10 Nov 2003 23:59:28 -0000 Issue 1857

Topics (messages 55111 through 55140):

Re: Died on open command
        55111 by: James Edward Gray II
        55112 by: Guay Jean-Sébastien
        55113 by: Chuck Fox
        55114 by: Guay Jean-Sébastien
        55115 by: LoBue, Mark
        55116 by: Wiggins d Anconia
        55120 by: John W. Krahn
        55127 by: R. Joseph Newton
        55128 by: R. Joseph Newton
        55129 by: R. Joseph Newton
        55130 by: James Edward Gray II
        55132 by: R. Joseph Newton
        55133 by: James Edward Gray II
        55135 by: drieux

Re: Adding a printer remotely
        55117 by: Paul Kraus
        55118 by: Ned Cunningham
        55119 by: LoBue, Mark

Peculiar problem using LWP::UserAgent
        55121 by: Rajesh Dorairajan
        55134 by: david
        55137 by: drieux

Playing with Numbers
        55122 by: SilverFox
        55123 by: LoBue, Mark
        55124 by: Guay Jean-Sébastien
        55139 by: drieux

Representing a Database as XML
        55125 by: Dan Anderson

More died on open command (from 55103)
        55126 by: Ganesh Shankar
        55136 by: John W. Krahn
        55138 by: drieux

Re: Module Object and sub module function
        55131 by: R. Joseph Newton

The File::Spec approach was Re: Died on open command
        55140 by: drieux

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]>


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

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55111.ezm"

Mime-Version: 1.0 (Apple Message framework v606)
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Message-Id: <[EMAIL PROTECTED]>
Content-Transfer-Encoding: quoted-printable
Cc: [EMAIL PROTECTED]
x-sender: James Edward Gray II <[EMAIL PROTECTED]>
From:  James Edward Gray II <[EMAIL PROTECTED]>
Subject: Re: Died on open command
Subject: Re: Died on open command:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 12:47:52 -0600
x-receiver: =?ISO-8859-1?Q?Guay_Jean-S=E9bastien?= <[EMAIL PROTECTED]>
To:  =?ISO-8859-1?Q?Guay_Jean-S=E9bastien?= <[EMAIL PROTECTED]>

On Nov 10, 2003, at 12:39 PM, Guay Jean-S=E9bastien wrote:

>> 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 '/'=20=

>> 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=20
> doing
>
> cd winnt\system32

That's exactly what John said.  ;)  The command interpreter, what you=20
are using above, is dumb and doesn't know the difference.  The OS does=20=

though and since Perl talks to the OS itself, it works as expected.

James


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55112.ezm"

Date: Mon, 10 Nov 2003 13:45:51 -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]>, begin begin <[EMAIL PROTECTED]>
To:  'drieux' <[EMAIL PROTECTED]>, begin begin <[EMAIL PROTECTED]>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: quoted-printable

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

Well, seems ActiveState didn't really have to do anything after all,
according to John W. Krahn. As far as I remember, it's always been like =
that
in ActiveState Perl.

But as I said, I still find it great that they didn't do anything to go
against what ends up being a great benefit for us multiplatform Perl =
coders.
:-)

J-S

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

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55113.ezm"

Date: Mon, 10 Nov 2003 13:51:19 -0500
x-sender: Chuck Fox <[EMAIL PROTECTED]>
From:  Chuck Fox <[EMAIL PROTECTED]>
MIME-Version: 1.0
x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
CC: "'John W. Krahn'" <[EMAIL PROTECTED]>, 'Perl-Beginners' <[EMAIL PROTECTED]>
Subject: Re: Died on open command
Subject: Re: Died on open command:[EMAIL PROTECTED]@!:
Content-Type: multipart/alternative; boundary="------------020808000209070105010700"

--------------020808000209070105010700
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit


[EMAIL PROTECTED] wrote:

>>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 
>
>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ébastien Guay
>-- Conseiller technique - Administration
>-- (514) 522-9800 #4840
>-- [EMAIL PROTECTED]
>  
>
Just tried on my WindowsXP box.  I had to enclose the path in double 
quotes.  But once I did that, Windows did the right thing,

dir "\temp"
dir "/temp"

both give me the temp directory listing.  Using single quotes or 
backticks does not work.

Chuck


--------------020808000209070105010700--

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55114.ezm"

Date: Mon, 10 Nov 2003 13:51: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: 'James Edward Gray II' <[EMAIL PROTECTED]>, 
=?iso-8859-1?Q?Guay_Jean-S=E9bastien?= <[EMAIL PROTECTED]>
To:  'James Edward Gray II' <[EMAIL PROTECTED]>, 
=?iso-8859-1?Q?Guay_Jean-S=E9bastien?= <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

> That's exactly what John said.  ;)  

I realized that 5 seconds after I sent the mail... <:-(


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55115.ezm"

x-sender: "LoBue, Mark" <[EMAIL PROTECTED]>
From:  "LoBue, Mark" <[EMAIL PROTECTED]>
x-receiver: =?iso-8859-1?Q?=27Guay_Jean-S=E9bastien=27?=         <[EMAIL PROTECTED]>, 
"'John W. Krahn'"  <[EMAIL PROTECTED]>, 'Perl-Beginners' <[EMAIL PROTECTED]>
To:  =?iso-8859-1?Q?=27Guay_Jean-S=E9bastien=27?=        <[EMAIL PROTECTED]>, "'John 
W. Krahn'"  <[EMAIL PROTECTED]>, 'Perl-Beginners' <[EMAIL PROTECTED]>
Subject: RE: Died on open command
Subject: RE: Died on open command:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 10:54:03 -0800
MIME-Version: 1.0
Content-Type: text/plain;       charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

> -----Original Message-----
> From: Guay Jean-S=E9bastien
> [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 10, 2003 10:43 AM
> To: 'John W. Krahn'; 'Perl-Beginners'
> Subject: RE: Died on open command
>=20
>=20
> > It has nothing to do with what ActiveState did or didn't do.  The
> > DOS/Windows command interpreter (command.com/cmd.exe) uses=20
> '\' as the
> > path separator however the operating system itself is able=20
> to use '/' as
> > the path separator.
>=20
> Err, just noticed I shouldn't have read so quick...=20
>=20
> Still, since cmd.exe goes to great lengths to prevent us from=20
> using the
> slash, forcing the backslash onto us, I thank ActiveState for=20
> not going the
> same way. :-)
>=20
> Thanks for rectifying things.
>=20

Well, cmd.exe just has a different meaning for /.  cmd uses / to pass =
in
options, instead of -, and spaces between the command and options is, =
well,
optional.

So, the command:
        cd winnt/system32
means cd to winnt and pass the option "system32" to the cd command, =
which
does nothing.

But, to override this behavior, use quotes around the directory name:

C:\>cd "winnt/system32"

C:\WINNT\system32>

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55116.ezm"

Date: Mon, 10 Nov 2003 12:03:12 -0700
Message-Id: <[EMAIL PROTECTED]>
x-sender: "Wiggins d Anconia" <[EMAIL PROTECTED]>
From:  "Wiggins d Anconia" <[EMAIL PROTECTED]>
x-receiver: begin begin <[EMAIL PROTECTED]>
To:  begin begin <[EMAIL PROTECTED]>
Subject: Re: Died on open command
Subject: Re: Died on open command:[EMAIL PROTECTED]@!:
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1



> 
> On Monday, Nov 10, 2003, at 10:17 US/Pacific, 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. :-)
> 
> 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
> 

This is where I very quickly run across the stage yelling
"File::Spec->catfile" and then just as abruptly as I entered, exit stage
left...

http://danconia.org


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55120.ezm"

x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Date: Mon, 10 Nov 2003 12:23:57 -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:
> 
> > Which version of Perl from ActiveState did this show up in?
> 
> Well, seems ActiveState didn't really have to do anything after all,
> according to John W. Krahn. As far as I remember, it's always been like that
> in ActiveState Perl.

IIRC the ability to use / instead of \ has been available since DOS 3.0.


John
-- 
use Perl;
program
fulfillment

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55127.ezm"

Date: Mon, 10 Nov 2003 14:19:26 -0800
x-sender: "R. Joseph Newton" <[EMAIL PROTECTED]>
From:  "R. Joseph Newton" <[EMAIL PROTECTED]>
MIME-Version: 1.0
x-receiver: drieux <[EMAIL PROTECTED]>
To:  drieux <[EMAIL PROTECTED]>
CC: begin begin <[EMAIL PROTECTED]>
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

drieux wrote:

> 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?

Nope.  Not at all.  System transparency means not having to concern
yourself with the system or its quirks, which is what Perl provides in re
file access.  Not because the '/' separator is 'nix, but because it is
more standard for file systems in general, inclucing URLs and URIs.  Perl
will translate per system under the surface.  Where you do have to take
note of Windows delimiters is in shelling out.  That is one of the many
related reasons why people advise against shelling out for functionality.

Joseph


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55128.ezm"

Date: Mon, 10 Nov 2003 14:21:47 -0800
x-sender: "R. Joseph Newton" <[EMAIL PROTECTED]>
From:  "R. Joseph Newton" <[EMAIL PROTECTED]>
MIME-Version: 1.0
x-receiver: Guay =?iso-8859-1?Q?Jean=2DS=E9bastien?=    <[EMAIL PROTECTED]>
To:  Guay =?iso-8859-1?Q?Jean=2DS=E9bastien?=   <[EMAIL PROTECTED]>
CC: "'John W. Krahn'" <[EMAIL PROTECTED]>,   "'Perl-Beginners'" <[EMAIL PROTECTED]>
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:

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

That is a Perl statement?!!

Joseph


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55129.ezm"

Date: Mon, 10 Nov 2003 14:24:31 -0800
x-sender: "R. Joseph Newton" <[EMAIL PROTECTED]>
From:  "R. Joseph Newton" <[EMAIL PROTECTED]>
MIME-Version: 1.0
x-receiver: Chuck Fox <[EMAIL PROTECTED]>
To:  Chuck Fox <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED],   "'John W. Krahn'" <[EMAIL PROTECTED]>, "'Perl-Beginners'" 
<[EMAIL PROTECTED]>
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

Chuck Fox wrote:

> Just tried on my WindowsXP box.  I had to enclose the path in double
> quotes.  But once I did that, Windows did the right thing,
>
> dir "\temp"
> dir "/temp"
>
> both give me the temp directory listing.  Using single quotes or
> backticks does not work.
>
> Chuck

I'll be darned!  'tworks!  On W2K, too.

Joseph


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55130.ezm"

Mime-Version: 1.0 (Apple Message framework v606)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <[EMAIL PROTECTED]>
Content-Transfer-Encoding: 7bit
Cc: [EMAIL PROTECTED]
x-sender: James Edward Gray II <[EMAIL PROTECTED]>
From:  James Edward Gray II <[EMAIL PROTECTED]>
Subject: Re: Died on open command
Subject: Re: Died on open command:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 16:28:11 -0600
x-receiver: "R. Joseph Newton" <[EMAIL PROTECTED]>
To:  "R. Joseph Newton" <[EMAIL PROTECTED]>

On Nov 10, 2003, at 4:19 PM, R. Joseph Newton wrote:

> Nope.  Not at all.  System transparency means not having to concern
> yourself with the system or its quirks, which is what Perl provides in 
> re
> file access.  Not because the '/' separator is 'nix, but because it is
> more standard for file systems in general, inclucing URLs and URIs.  
> Perl
> will translate per system under the surface.

I'm not aware of Perl doing any translation of '/'.  Someone please 
correct me if I'm wrong though.  I believe this is why the the 
File::Spec modules are standard.  '/' works on the majority of systems 
these days, but if you want true portability, I believe you want the 
earlier mentioned catfile().

James


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55132.ezm"

Date: Mon, 10 Nov 2003 14:47:40 -0800
x-sender: "R. Joseph Newton" <[EMAIL PROTECTED]>
From:  "R. Joseph Newton" <[EMAIL PROTECTED]>
MIME-Version: 1.0
x-receiver: James Edward Gray II <[EMAIL PROTECTED]>
To:  James Edward Gray II <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
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

James Edward Gray II wrote:

> On Nov 10, 2003, at 4:19 PM, R. Joseph Newton wrote:
>
> > Nope.  Not at all.  System transparency means not having to concern
> > yourself with the system or its quirks, which is what Perl provides in
> > re
> > file access.  Not because the '/' separator is 'nix, but because it is
> > more standard for file systems in general, inclucing URLs and URIs.
> > Perl
> > will translate per system under the surface.
>
> I'm not aware of Perl doing any translation of '/'.  Someone please
> correct me if I'm wrong though.  I believe this is why the the
> File::Spec modules are standard.  '/' works on the majority of systems
> these days, but if you want true portability, I believe you want the
> earlier mentioned catfile().
>
> James

Look down the thread, and you will find correction from others, also.  I can
tell you that I have generated tousands of files in folders reached by
relative paths, and all I have had to offer Perl was '/'s.  It has been
working for some time, and quite handsomely.

Joseph



--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55133.ezm"

Mime-Version: 1.0 (Apple Message framework v606)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <[EMAIL PROTECTED]>
Content-Transfer-Encoding: 7bit
Cc: [EMAIL PROTECTED]
x-sender: James Edward Gray II <[EMAIL PROTECTED]>
From:  James Edward Gray II <[EMAIL PROTECTED]>
Subject: Re: Died on open command
Subject: Re: Died on open command:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 16:54:27 -0600
x-receiver: "R. Joseph Newton" <[EMAIL PROTECTED]>
To:  "R. Joseph Newton" <[EMAIL PROTECTED]>

On Nov 10, 2003, at 4:47 PM, R. Joseph Newton wrote:

> Look down the thread, and you will find correction from others, also.  
> I can
> tell you that I have generated tousands of files in folders reached by
> relative paths, and all I have had to offer Perl was '/'s.  It has been
> working for some time, and quite handsomely.

Let me guess, on UNIX flavors, Windows, Mac OS X and/or Linux, right?  
All of these OSes understand '/'.  This is no Perl magic.  Again, they 
bundle the File::Spec modules for a reason, I would bet.

James


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55135.ezm"

Date: Mon, 10 Nov 2003 15:17:19 -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 11:03 US/Pacific, Wiggins d Anconia wrote:
[..]
> This is where I very quickly run across the stage yelling
> "File::Spec->catfile" and then just as abruptly as I entered, exit 
> stage
> left...

Wiggins!!!! we were having a Lovely Ideological Struggle
between the Forces of WhomEver and their Opposition!!!

You really should NOT be complicating the process with
this Old School Tie Aproach of

        perldoc File::Spec

hence the sort of insti-auto-majik code re-usability
across the various OS's, including VMS and 'mac classic'
and OS2 and.... At which point I think that Ideologically
I would be forced to assert the part john started with
but require the canonical

        foreach my $seqfilename (@files)
        {
                my $file = File::Spec->catfile($folder, $seqfilename);
                open(TXTFILE, "<$file") or die "a horrid death here because: $!\n";
                ....
        }

But I would like to thank those who have shared which side
of the line the "\" v. "/" issues are on the Win32 side.

ciao
drieux

---


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55117.ezm"

Reply-To: <[EMAIL PROTECTED]>
x-sender: "Paul Kraus" <[EMAIL PROTECTED]>
From:  "Paul Kraus" <[EMAIL PROTECTED]>
x-receiver: "'Ned Cunningham'" <[EMAIL PROTECTED]>,     <[EMAIL PROTECTED]>
To:  "'Ned Cunningham'" <[EMAIL PROTECTED]>,    <[EMAIL PROTECTED]>
Subject: RE: Adding a printer remotely
Subject: RE: Adding a printer remotely:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 14:32:33 -0500
MIME-Version: 1.0
Content-Type: text/plain;       charset="us-ascii"
Content-Transfer-Encoding: 7bit

I Don't understand what you mean...

Are you asking how to attach to a printer that is on your network?
Is the printer have its own ip address ? Or is it shared on a windows
machine on that network.

\\111.111.111.111 to attach to the ip assigned printer
\\machine\sharename(akaprintername) to attach to the printer on a
windows machine.

Not sure how you would do it in perl but it shouldn't be to hard using
the supplied info. 
That's assuming I understand you correctly.

Describe what you want to do and then let us decide on what's relevant
as far as info goes :)

Paul Kraus

-----Original Message-----
x-sender: Ned Cunningham [mailto:[EMAIL PROTECTED] 
From:  Ned Cunningham [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 10, 2003 1:39 PM
x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Subject: Adding a printer remotely
Subject: Adding a printer remotely:[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]

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


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55118.ezm"

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

Ok,

I have 500 remote locations.  They consist of 2 networked nt 4 sp6 =
workstations.

Remotely, that is by sending a CD or by a polling program, I need to add =
a printer.

Both WK2 and XP has this functionality, however NT does not, (or at =
least I havent found it).

I found a reference to using the WSH in Perl, but not examples.

TIA

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

                -----Original Message-----
                From:   Paul Kraus [mailto:[EMAIL PROTECTED]
                Sent:   Monday, November 10, 2003 2:33 PM
                To:     Ned Cunningham; [EMAIL PROTECTED]
                Subject:        RE: Adding a printer remotely

                I Don't understand what you mean...

                Are you asking how to attach to a printer that is on your network?
                Is the printer have its own IP address ? Or is it shared on a windows
                machine on that network.

                \\111.111.111.111 to attach to the IP assigned printer
                \\machine\sharename(akaprintername) to attach to the printer on a
                windows machine.

                Not sure how you would do it in perl but it shouldn't be to hard using
                the supplied info.=20
                That's assuming I understand you correctly.

                Describe what you want to do and then let us decide on what's relevant
                as far as info goes :)

                Paul Kraus

                -----Original Message-----
                From: Ned Cunningham [mailto:[EMAIL PROTECTED]
                Sent: Monday, November 10, 2003 1:39 PM
                To: [EMAIL PROTECTED]
                Subject: Adding a printer remotely


                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]

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

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55119.ezm"

x-sender: "LoBue, Mark" <[EMAIL PROTECTED]>
From:  "LoBue, Mark" <[EMAIL PROTECTED]>
x-receiver: 'Ned Cunningham' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
To:  'Ned Cunningham' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: RE: Adding a printer remotely
Subject: RE: Adding a printer remotely:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 12:23:26 -0800
MIME-Version: 1.0
Content-Type: text/plain;       charset="iso-8859-1"

> -----Original Message-----
> From: Ned Cunningham [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 10, 2003 12:07 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: Adding a printer remotely
> 
> 
> Ok,
> 
> I have 500 remote locations.  They consist of 2 networked nt 
> 4 sp6 workstations.
> 
> Remotely, that is by sending a CD or by a polling program, I 
> need to add a printer.
> 
> Both WK2 and XP has this functionality, however NT does not, 
> (or at least I havent found it).

I done some things like this with policies and with startup batch jobs.
Just need to know if the printer is a network printer, or a printer
connected locally at each remote location, possibly different printer
models.  I'm wondering if this will have a perl solution, maybe not.

-Mark

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55121.ezm"

x-sender: "Rajesh Dorairajan" <[EMAIL PROTECTED]>
From:  "Rajesh Dorairajan" <[EMAIL PROTECTED]>
x-receiver: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
To:  "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: Peculiar problem using LWP::UserAgent
Subject: Peculiar problem using LWP::UserAgent:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 13:16:23 -0800
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C3A7CF.07227174"

------_=_NextPart_001_01C3A7CF.07227174
Content-Type: text/plain;
 charset=iso-8859-1
Content-Transfer-Encoding: 7bit

I ran into peculiar problem using LWP::UserAgent. I receive a 501 - Not yet
implemented error when I connect to a web-server using the User-Agent. This
happens when I pass in the Hostname and Portnumber as parameters in my
function. However, if I hard-code the Server-name and port number it seems
to work fine. I've included the piece of causing the problem below. Does
anyone have suggestion why this is happening?


    my ( $Host, $Port ) = @_;
    my $url = "$Host:$Port";             #Does not work
    #my $url = "http://servername:80";    #This works
    
    require LWP::UserAgent;
    my $ua = LWP::UserAgent->new(env_proxy => 0,
                              keep_alive => 0,
                              timeout => 30,
                             );

    $response = $ua->get( $url );

Thanks in Advance,

Rajesh Dorairajan 

------_=_NextPart_001_01C3A7CF.07227174--


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55134.ezm"

x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
x-sender: david <[EMAIL PROTECTED]>
From:  david <[EMAIL PROTECTED]>
Subject: Re: Peculiar problem using LWP::UserAgent
Subject: Re: Peculiar problem using LWP::UserAgent:[EMAIL PROTECTED]@!:
Reply-To: [EMAIL PROTECTED]
Date: Mon, 10 Nov 2003 15:19:13 -0800
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit

Rajesh Dorairajan wrote:

> I ran into peculiar problem using LWP::UserAgent. I receive a 501 - Not
> yet implemented error when I connect to a web-server using the User-Agent.
> This happens when I pass in the Hostname and Portnumber as parameters in
> my function. However, if I hard-code the Server-name and port number it
> seems to work fine. I've included the piece of causing the problem below.
> Does anyone have suggestion why this is happening?
> 
> 
>     my ( $Host, $Port ) = @_;
>     my $url = "$Host:$Port";             #Does not work
>     #my $url = "http://servername:80";    #This works
>     
>     require LWP::UserAgent;
>     my $ua = LWP::UserAgent->new(env_proxy => 0,
>                               keep_alive => 0,
>                               timeout => 30,
>                              );
> 
>     $response = $ua->get( $url );
>

are you sure you construct the right path? for example:

#!/usr/bin/perl -w
use strict;

use LWP::UserAgent;

sub print_page{

        my($host,$port) = @_;

        my $url = $host;

        $url .= ":$port" if($port);

        my $ua = LWP::UserAgent->new(env_proxy  => 0, 
                                     keep_alive => 0, 
                                     timeout    => 30);

        my $r = $ua->request(HTTP::Request->new(GET => $url));

        print $r->content if($r->is_success);
        print $r->code,': ',$r->status_line unless($r->is_success);
        print "\n";
}

print_page('http://google.com');    #-- works fine
print_page('http://google.com',80); #-- works fine
print_page('google.com');           #-- 400: URL must be absolute
print_page('google.com',80);        #-- 501: Protocol not supported

__END__

you are most likely seeing the last one. make sure you specify the protocol.

david
-- 
$_=q,015001450154015401570040016701570162015401440041,,*,=*|=*_,split+local$";
map{~$_&1&&{$,<<=1,[EMAIL PROTECTED]||3])=>~}}0..s~.~~g-1;*_=*#,

goto=>print+eval

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55137.ezm"

Date: Mon, 10 Nov 2003 15:24:45 -0800
Subject: Re: Peculiar problem using LWP::UserAgent
Subject: Re: Peculiar problem using LWP::UserAgent:[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 13:16 US/Pacific, Rajesh Dorairajan wrote:
[..]
>
>     my ( $Host, $Port ) = @_;
>     my $url = "$Host:$Port";             #Does not work
>     #my $url = "http://servername:80";    #This works
>
>     require LWP::UserAgent;
>     my $ua = LWP::UserAgent->new(env_proxy => 0,
>                               keep_alive => 0,
>                               timeout => 30,
>                              );
>
>     $response = $ua->get( $url );
[..]

since you are planning to use the LWP user agent,
and, you want to look at ONLY the 'host_port' top most
connection, then why not think about it in terms of

        my ($host, $port, $path) = @_

        my $url = "http://$host";;
        $url .= ":$port" if $port;
        $url .= $path if $path;

notice that in this case you would be 'golden' with

        get_from_server('www.wetware.com');
        get_from_server('www.wetware.com','80');
        get_from_server('www.wetware.com','80','/drieux/PR/blog2/');

Then if you decide that you want to manage schema other then http
you could modify it with say

        my ($host, $port, $path, $schema) = @_

        my $url = $schema || 'http';
        $url .=  "://$host";
        ...

ah whala!

ciao
drieux

---


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55122.ezm"

x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
x-sender: SilverFox <[EMAIL PROTECTED]>
From:  SilverFox <[EMAIL PROTECTED]>
Subject: Playing with Numbers
Subject: Playing with Numbers:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 16:13:43 -0500
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit

Hi all, i'm trying to figure out how to test if a number is five digits and 
if not add zero/s in front to make it 5 digits. Any ideas?????

Examples:

444  = 00444
4120 = 04120
23   = 00023

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55123.ezm"

x-sender: "LoBue, Mark" <[EMAIL PROTECTED]>
From:  "LoBue, Mark" <[EMAIL PROTECTED]>
x-receiver: 'SilverFox' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
To:  'SilverFox' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: RE: Playing with Numbers
Subject: RE: Playing with Numbers:[EMAIL PROTECTED]@!:
Date: Mon, 10 Nov 2003 13:29:44 -0800
MIME-Version: 1.0
Content-Type: text/plain;       charset="iso-8859-1"

> -----Original Message-----
> From: SilverFox [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 10, 2003 1:14 PM
> To: [EMAIL PROTECTED]
> Subject: Playing with Numbers
> 
> 
> Hi all, i'm trying to figure out how to test if a number is 
> five digits and 
> if not add zero/s in front to make it 5 digits. Any ideas?????
> 
> Examples:
> 
> 444  = 00444
> 4120 = 04120
> 23   = 00023
> 

What if the number is greater than 5 digits?  For the input you provide,
this works:

my $five_digit_number = sprintf "%05d", $original_number;

If the number is 5 or more digits, then just the original number is
returned.

-Mark

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55124.ezm"

Date: Mon, 10 Nov 2003 16:29:11 -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: Playing with Numbers
Subject: RE: Playing with Numbers:[EMAIL PROTECTED]@!:
x-receiver: 'SilverFox' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
To:  'SilverFox' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: quoted-printable

my $integer =3D 432;
my $string =3D sprintf("%05d", $integer);

Yay!

J-S

-----Message d'origine-----
De: SilverFox [mailto:[EMAIL PROTECTED]
Date: 10 novembre, 2003 16:14
=C0: [EMAIL PROTECTED]
Objet: Playing with Numbers


Hi all, i'm trying to figure out how to test if a number is five digits =
and=20
if not add zero/s in front to make it 5 digits. Any ideas?????

Examples:

444  =3D 00444
4120 =3D 04120
23   =3D 00023

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

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55139.ezm"

Date: Mon, 10 Nov 2003 15:38:06 -0800
Subject: Re: Playing with Numbers
Subject: Re: Playing with Numbers:[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 13:13 US/Pacific, SilverFox wrote:

> Hi all, i'm trying to figure out how to test if a number is five 
> digits and
> if not add zero/s in front to make it 5 digits. Any ideas?????
>
> Examples:
>
> 444  = 00444
> 4120 = 04120
> 23   = 00023

there are two parts to your question, the later is answered
with the sprintf - cf perldoc -f sprintf, as others have noted
this leaves only the RE part

        $token = sprintf("%05d", $token)
                if ($token =~ /^\d+$/ );

the 'if' condition is checking that the "$token" is all
numeric from beginning to end, and if so it will sprintf() it.

ciao
drieux

---

cf:
        
        my @list = qw(
        444
        4120
        23
        bob
        12345
        123456
        3bob
        );
        
        five_wide($_) foreach(@list);
        
        #------------------------
        #
        sub five_wide
        {
                my ($token) = @_;
                
                print "$token = ";
                
                $token = sprintf("%05d", $token)
                        if ($token =~ /^\d+$/ );
        
                print " $token \n";
                
        } # end of five_wide


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55125.ezm"

Subject: Representing a Database as XML
Subject: Representing a Database as XML:[EMAIL PROTECTED]@!:
x-sender: Dan Anderson <[EMAIL PROTECTED]>
From:  Dan Anderson <[EMAIL PROTECTED]>
x-receiver: Perl Beginners <[EMAIL PROTECTED]>
To:  Perl Beginners <[EMAIL PROTECTED]>
Content-Type: text/plain
Message-Id: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Date: Mon, 10 Nov 2003 16:44:04 -0500
Content-Transfer-Encoding: 7bit

Does anyone know of a good module to use to represent a database (or SQL
statements) as XML?  I'm trying to throw together something that will
work with different databases.  I want to create a "translator" that
will change from the XML to database specific SQL.

Thanks in advance,

Dan


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55126.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 13:54:03 -0800
Subject: More died on open command (from 55103)
Subject: More died on open command (from 55103):[EMAIL PROTECTED]@!:
Message-Id: <[EMAIL PROTECTED]>

Hello all,
I tried modifying the open command ar suggested and got the enclosed
errors.  Also, I'm working with Activestate Activeperl 5.6 on a Windows
2000.  Also, from the syntax of the readdir example, the test is to the
left of the readdir command.  Does this mean  I should place my file
processing block to the left of the readdir command.  That would be one
ugly statement.

Thanks for all the help.

-Ganesh

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)

chdir($folder); #added this line after failing with open commands below.

print "Switching to folder  $folder!\n\n"; # It's going to the correct
folder

@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";# Prints out correct filenames

closedir(FOLDER);

foreach my $seqfilename (@files){
        
        $seqfilename = '';
        open (TXTFILE,"<$seqfilename") or die $!; #dies on this line.Replace with
        open (TXTFILE,"<$folder/$seqfilename") or die $!; #Invalid argument at this 
line.  Replace with
        open (TXTFILE,"<$folder\$seqfilename") or die $!; #No such file or directory 
error at this line
close TXTFILE;


my @seqelements = <TXTFILE>;

..........goes on from here
I know the conversion routine works, because it worked
when I specified a single file
-- 
  Ganesh Shankar
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - Or how I learned to stop worrying and
                          love email again

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55136.ezm"

x-receiver: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Date: Mon, 10 Nov 2003 15:24:07 -0800
x-sender: "John W. Krahn" <[EMAIL PROTECTED]>
From:  "John W. Krahn" <[EMAIL PROTECTED]>
MIME-Version: 1.0
Subject: Re: More died on open command (from 55103)
Subject: Re: More died on open command (from 55103):[EMAIL PROTECTED]@!:
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Ganesh Shankar wrote:
> 
> Hello all,

Hello,

> I tried modifying the open command ar suggested and got the enclosed
> errors.  Also, I'm working with Activestate Activeperl 5.6 on a Windows
> 2000.  Also, from the syntax of the readdir example, the test is to the
> left of the readdir command.  Does this mean  I should place my file
> processing block to the left of the readdir command.  That would be one
> ugly statement.
> 
> [snip]
> 
> 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)
> 
> chdir($folder); #added this line after failing with open commands below.
> 
> print "Switching to folder  $folder!\n\n"; # It's going to the correct
> folder
> 
> @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";# Prints out correct filenames
> 
> closedir(FOLDER);
> 
> foreach my $seqfilename (@files){
> 
>         $seqfilename = '';
>         open (TXTFILE,"<$seqfilename") or die $!; #dies on this line.Replace with

This won't work because it is trying to open $seqfilename in the current
directory.


>         open (TXTFILE,"<$folder/$seqfilename") or die $!; #Invalid argument at this 
> line.  Replace with

Windows apparently sends an EINVAL ("Invalid argument") when there are
certain non-printable characters in the file name!  (Who knew?)

http://mail.python.org/pipermail/python-list/2002-March/090323.html


>         open (TXTFILE,"<$folder\$seqfilename") or die $!; #No such file or directory 
> error at this line

This won't work because the backslash will escape the dollar sign.  If
you want the backslash character in a double quoted string you will have
to escape it (precede it with a backslash.)


John
-- 
use Perl;
program
fulfillment

--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55138.ezm"

Date: Mon, 10 Nov 2003 15:28:29 -0800
Subject: Re: More died on open command (from 55103)
Subject: Re: More died on open command (from 55103):[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 13:54 US/Pacific, Ganesh Shankar wrote:
[..]

since you chdir INTO the $folder
you need to merely fix the foreach loop:

> foreach my $seqfilename (@files){
>       
>       $seqfilename = '';
comment out the
        #$seqfilename ='';
otherwise the next line:

>       open (TXTFILE,"<$seqfilename") or die $!; #dies on this line.Replace 
> with

will be interpreted as

        open (TXTFILE,"<")

and that should DIE! since it is trying to open as input
a non-existent file!

[..]
ciao
drieux

---


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55131.ezm"

Date: Mon, 10 Nov 2003 14:34:11 -0800
x-sender: "R. Joseph Newton" <[EMAIL PROTECTED]>
From:  "R. Joseph Newton" <[EMAIL PROTECTED]>
MIME-Version: 1.0
x-receiver: Rob Dixon <[EMAIL PROTECTED]>
To:  Rob Dixon <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: Module Object and sub module function
Subject: Re: Module Object and sub module function:[EMAIL PROTECTED]@!:
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Rob Dixon wrote:

> 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

No-o-o-o, I was missing something--the package name still hanging
onto the function name.  Sorry, I sometimes just don't see what I
would never think of looking for.  All I saw was the object
pointing to its method.  Shoulda looked closer before I clapped.

Joseph


--fpedheinclhmkdkejmok
Content-Type: message/rfc822
Content-Disposition: inline; filename="beginners_55140.ezm"

Date: Mon, 10 Nov 2003 15:59:07 -0800
Subject: The File::Spec approach was Re: Died on open command
Subject: The File::Spec approach was 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 14:54 US/Pacific, James Edward Gray II 
wrote:

> On Nov 10, 2003, at 4:47 PM, R. Joseph Newton wrote:
>
>> Look down the thread, and you will find correction from others, also. 
>>  I can
>> tell you that I have generated tousands of files in folders reached by
>> relative paths, and all I have had to offer Perl was '/'s.  It has 
>> been
>> working for some time, and quite handsomely.
>
> Let me guess, on UNIX flavors, Windows, Mac OS X and/or Linux, right?  
> All of these OSes understand '/'.  This is no Perl magic.  Again, they 
> bundle the File::Spec modules for a reason, I would bet.

for fun, folks might want to do

        perldoc -m File::Spec::Win32

and one will notice the Old Dog at the top of that module

        package File::Spec::Win32;

        use strict;
        use Cwd;
        use vars qw(@ISA);
        require File::Spec::Unix;
        @ISA = qw(File::Spec::Unix);

at which point there is the question about 'over-riding'
those base set of methods.

Also if folks Peek into File::Spec we notice that it
will be checking against '$^O' and/or using 'Unix' so if
the version of perl one is using is NOT returning

        my %module = (MacOS   => 'Mac',
               MSWin32 => 'Win32',
               os2     => 'OS2',
               VMS     => 'VMS');

then the File::Spec::Unix will be used directly. If one wants to
check they can run the old scam:

[jeeves: 5:] perl -e 'print "my OS is $^O\n";'
my OS is darwin
[jeeves: 6:]

HTH.


ciao
drieux

---


--fpedheinclhmkdkejmok--



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

Reply via email to