[27327] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9048 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 13 14:08:03 2006

Date: Mon, 13 Mar 2006 11:05:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 13 Mar 2006     Volume: 10 Number: 9048

Today's topics:
        Creating Graphs Dynamically with Perl <no@spam>
    Re: Creating Graphs Dynamically with Perl <john@castleamber.com>
    Re: Creating Graphs Dynamically with Perl <1usa@llenroc.ude.invalid>
    Re: Creating Graphs Dynamically with Perl xhoster@gmail.com
    Re: Creating Graphs Dynamically with Perl <rvtol+news@isolution.nl>
    Re: Creating Graphs Dynamically with Perl <john@castleamber.com>
    Re: Creating Graphs Dynamically with Perl <john@castleamber.com>
    Re: Creating Graphs Dynamically with Perl <john@castleamber.com>
    Re: Creating Graphs Dynamically with Perl <1usa@llenroc.ude.invalid>
        debugging perl program with Tk mainloop <ngoc@yahoo.com>
    Re: debugging perl program with Tk mainloop <zentara@highstream.net>
    Re: debugging perl program with Tk mainloop <Peter@PSDT.com>
    Re: debugging perl program with Tk mainloop <ngoc@yahoo.com>
    Re: export a variable from a module <bugbear@trim_papermule.co.uk_trim>
    Re: export a variable from a module <uri@stemsystems.com>
    Re: export a variable from a module <john@castleamber.com>
    Re: export a variable from a module <uri@stemsystems.com>
    Re: export a variable from a module <john@castleamber.com>
    Re: for installing perl modules - is there a default C  <sisyphus1@nomail.afraid.org>
    Re: Paths help <1700-820@onlinehome.de>
    Re: Paths help <1usa@llenroc.ude.invalid>
    Re: Paths help <1700-820@onlinehome.de>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 13 Mar 2006 09:10:26 -0600
From: "Hi" <no@spam>
Subject: Creating Graphs Dynamically with Perl
Message-Id: <121b2r8hp8o2td9@corp.supernews.com>

How do I create graphs that look like MRTG dynamically with perl?  Are there 
any easy ways to do that?

Matt




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

Date: 13 Mar 2006 18:25:02 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Creating Graphs Dynamically with Perl
Message-Id: <Xns97857E4EAC711castleamber@130.133.1.4>

"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote:

> John Bokma <john@castleamber.com> wrote in 
> news:Xns978565EB34C98castleamber@130.133.1.4:
> 
>> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote:
>> 
>>> MRTG
>> 
>> http://www.google.com/search?q=MRTG
> 
> What is your point?

Did you read the posting guidelines, especially

"Do not use these guidelines as a "license to flame" or other
 meanness. It is possible that a poster is unaware of things
 discussed here.  Give them the benefit of the doubt, and just
 help them learn how to post, rather than assume "

Since MRTG is written in Perl, some people here might know that MRTG = 
Perl, and are able to answer the question. You don't, so don't hide behind 
the posting guidelines. If you don't want to look it up using Google, why 
waste your time on repeating the old guideline mantra?

-- 
John                Experienced Perl programmer: http://castleamber.com/


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

Date: Mon, 13 Mar 2006 15:30:07 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Creating Graphs Dynamically with Perl
Message-Id: <Xns97856AF23F92Aasu1cornelledu@127.0.0.1>

"Hi" <no@spam> wrote in news:121b2r8hp8o2td9@corp.supernews.com:

> How do I create graphs that look like MRTG dynamically with perl?  Are
> there any easy ways to do that?

What is MRTG?

Have you seen the posting guidelines for this group?

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

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



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

Date: 13 Mar 2006 15:43:27 GMT
From: xhoster@gmail.com
Subject: Re: Creating Graphs Dynamically with Perl
Message-Id: <20060313104933.940$TC@newsreader.com>

"Hi" <no@spam> wrote:
> How do I create graphs that look like MRTG dynamically with perl?  Are
> there any easy ways to do that?

I had no idea what MRTG was, so I googled on it.  The first hit said "MRTG
is written in perl and works on Unix/Linux as well as Windows and even
Netware systems".  So my guess would be that to do something like MRTG in
Perl, you would use MRTG.  If you already tried that and encountered
problems, then what were the problems?

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Mon, 13 Mar 2006 16:55:55 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Creating Graphs Dynamically with Perl
Message-Id: <dv48c7.130.1@news.isolution.nl>

Hi schreef:
> How do I create graphs that look like MRTG dynamically with perl? 
> Are there any easy ways to do that?

Search for RRD in CPAN?

-- 
Affijn, Ruud

"Gewoon is een tijger."
echo 014C8A26C5DB87DBE85A93DBF |perl -pe 'tr/0-9A-F/JunkshoP cartel,/'


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

Date: 13 Mar 2006 16:01:11 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Creating Graphs Dynamically with Perl
Message-Id: <Xns978565EB34C98castleamber@130.133.1.4>

"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote:

> MRTG

http://www.google.com/search?q=MRTG

-- 
John                Experienced Perl programmer: http://castleamber.com/


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

Date: 13 Mar 2006 16:02:57 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Creating Graphs Dynamically with Perl
Message-Id: <Xns9785663823F4castleamber@130.133.1.4>

"Hi" <no@spam> wrote:

> How do I create graphs that look like MRTG dynamically with perl?  Are
> there any easy ways to do that?

If you mean http://www.stat.ee.ethz.ch/mrtg/
yes.

http://search.cpan.org/search?query=GD-Graph&mode=module
might be an option.

-- 
John                Experienced Perl programmer: http://castleamber.com/


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

Date: 13 Mar 2006 16:04:02 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Creating Graphs Dynamically with Perl
Message-Id: <Xns9785666704700castleamber@130.133.1.4>

xhoster@gmail.com wrote:

> "Hi" <no@spam> wrote:
>> How do I create graphs that look like MRTG dynamically with perl? 
>> Are there any easy ways to do that?
> 
> I had no idea what MRTG was, so I googled on it.  The first hit said
> "MRTG is written in perl and works on Unix/Linux as well as Windows
> and even Netware systems".

Aargh, overlooked that small fact (written in Perl).


-- 
John                Experienced Perl programmer: http://castleamber.com/


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

Date: Mon, 13 Mar 2006 17:04:10 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Creating Graphs Dynamically with Perl
Message-Id: <Xns97857AE4A11B6asu1cornelledu@127.0.0.1>

John Bokma <john@castleamber.com> wrote in 
news:Xns978565EB34C98castleamber@130.133.1.4:

> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote:
> 
>> MRTG
> 
> http://www.google.com/search?q=MRTG

What is your point?

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

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



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

Date: Mon, 13 Mar 2006 11:21:02 +0100
From: ngoc <ngoc@yahoo.com>
Subject: debugging perl program with Tk mainloop
Message-Id: <lbOdnY_X9e9QpYjZ4p2dnA@telenor.com>

Hi
I want to debugg a program with GUI. I dislike using "print $variable" 
in the program. So I use perl -d instead. But "<DB4>c 2700" start GUI 
section and I have to click exit on GUI to turn back to command line 
again and the program is already terminated. As consequence, I can not 
use "p $variable" after that. How can I solve this problem?
ngoc


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

Date: Mon, 13 Mar 2006 12:26:16 GMT
From: zentara <zentara@highstream.net>
Subject: Re: debugging perl program with Tk mainloop
Message-Id: <80pa125764ecrlmgqioue63df6bdog7elj@4ax.com>

On Mon, 13 Mar 2006 11:21:02 +0100, ngoc <ngoc@yahoo.com> wrote:

>Hi
>I want to debugg a program with GUI. I dislike using "print $variable" 
>in the program. So I use perl -d instead. But "<DB4>c 2700" start GUI 
>section and I have to click exit on GUI to turn back to command line 
>again and the program is already terminated. As consequence, I can not 
>use "p $variable" after that. How can I solve this problem?
>ngoc

Try using Devel::ptkdb  on Tk programs and see how you like it.


-- 
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html


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

Date: Mon, 13 Mar 2006 14:41:23 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: debugging perl program with Tk mainloop
Message-Id: <pan.2006.03.13.14.41.16.359923@PSDT.com>

On Mon, 13 Mar 2006 11:21:02 +0100, ngoc wrote:
> I want to debugg a program with GUI. I dislike using "print $variable" in
> the program. So I use perl -d instead. But "<DB4>c 2700" start GUI section
> and I have to click exit on GUI to turn back to command line again and the
> program is already terminated. As consequence, I can not use "p $variable"
> after that. How can I solve this problem? ngoc

Set breakpoints inside the callbacks before continuing.

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/



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

Date: Mon, 13 Mar 2006 18:15:56 +0100
From: ngoc <ngoc@yahoo.com>
Subject: Re: debugging perl program with Tk mainloop
Message-Id: <juWdnXF54LeUB4jZ4p2dnA@telenor.com>


> 
> Set breakpoints inside the callbacks before continuing.
> 
I use
<DB 1>b 1974 ->"which is before mainloop"
<DB 2>p $variable_name ->"no value"
So I type
<DB 3>c 2877 ->"GUI show up. And I can now click on button to give 
values to variables"
But I can not type "p $variable name" to know the value of variable. How 
can I make it jump over to <DB 4> to type in "p $variable_name"?


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

Date: Mon, 13 Mar 2006 10:25:59 +0000
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: export a variable from a module
Message-Id: <441548b8$0$3597$ed2e19e4@ptn-nntp-reader04.plus.net>

Uri Guttman wrote:
>>>>>>"b" == bugbear  <bugbear@trim_papermule.co.uk_trim> writes:
> 
> 
>   b> Sisyphus wrote:
>   b> (a perfect and complete answer to my question)
> 
>   b> Thank you very much - you're a life saver.
> 
>   b> I always run "use strict", so rather
>   b> a lot of the examples I found didn't work.
> 
>   b> The key magic here is the "our"
>   b> word, which is a new one on me.
> 
> the reason you didn't see it is that you should rarely export
> variables. 

I'm not; I'm exporting constants.

Or I would be if perl had such a thing. As it is,
I'm exporting variables :-)

Qualifying them by package name would make
the using code very large and difficult to read,
since quite often a single method call may use
3-5 of them.

Thanks to all for the advice and solutions.

    BugBear


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

Date: Mon, 13 Mar 2006 10:43:30 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: export a variable from a module
Message-Id: <x7lkvebba5.fsf@mail.sysarch.com>

>>>>> "b" == bugbear  <bugbear@trim_papermule.co.uk_trim> writes:

  b> Uri Guttman wrote:
  >>>>>>> "b" == bugbear  <bugbear@trim_papermule.co.uk_trim> writes:
  b> Sisyphus wrote:
  b> (a perfect and complete answer to my question)
  b> Thank you very much - you're a life saver.
  b> I always run "use strict", so rather
  b> a lot of the examples I found didn't work.
  b> The key magic here is the "our"
  b> word, which is a new one on me.
  >> the reason you didn't see it is that you should rarely export
  >> variables.

  b> I'm not; I'm exporting constants.

  b> Or I would be if perl had such a thing. As it is,
  b> I'm exporting variables :-)

as you were told in another response perl has a constant pragma. and
when you export them you export subs, not variables.

  b> Qualifying them by package name would make
  b> the using code very large and difficult to read,
  b> since quite often a single method call may use
  b> 3-5 of them.

there are probably better ways to design an api so it doesn't need lots
of predefined constants. this has nothing to do with the export issue
but plenty to do with api design. but i can't fix that without massive
specs and code so don't bother. :/

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: 13 Mar 2006 16:53:46 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: export a variable from a module
Message-Id: <Xns97856ED5DA767castleamber@130.133.1.4>

Uri Guttman <uri@stemsystems.com> wrote:
 
> as you were told in another response perl has a constant pragma

Which just creates a subroutine in the current implementation. Read the 
BUGS section in perldoc constant.


-- 
John                Experienced Perl programmer: http://castleamber.com/


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

Date: Mon, 13 Mar 2006 13:30:51 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: export a variable from a module
Message-Id: <x7u0a29oys.fsf@mail.sysarch.com>

>>>>> "JB" == John Bokma <john@castleamber.com> writes:

  JB> Uri Guttman <uri@stemsystems.com> wrote:
  >> as you were told in another response perl has a constant pragma

  JB> Which just creates a subroutine in the current implementation. Read the 
  JB> BUGS section in perldoc constant.

please pay attention. he was creating variables, not constants. vars are
rarely exported as i said but subs are commonly exported as subs or
constants.

foo!

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: 13 Mar 2006 18:50:46 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: export a variable from a module
Message-Id: <Xns978582ABE4BE5castleamber@130.133.1.4>

Uri Guttman <uri@stemsystems.com> wrote:

>>>>>> "JB" == John Bokma <john@castleamber.com> writes:
> 
>   JB> Uri Guttman <uri@stemsystems.com> wrote:
>  >> as you were told in another response perl has a constant pragma
> 
>   JB> Which just creates a subroutine in the current implementation.
>   Read the JB> BUGS section in perldoc constant.
> 
> please pay attention. he was creating variables, not constants.

Please read more carefully, I replied to "constant pragma" with: which 
just creates a subroutine.

To me it's not the same as a constant in other programming languages, YMMV

> vars
> are rarely exported as i said but subs are commonly exported as subs
> or constants.

Did I said something that contradicts this? No. I only stated that a 
"constant" is a subroutine in the current implementation, nothing more, 
nothing less.

-- 
John                Experienced Perl programmer: http://castleamber.com/


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

Date: Mon, 13 Mar 2006 20:05:42 +1100
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: for installing perl modules - is there a default C compiler on win X64
Message-Id: <441536a3$0$25197$afc38c87@news.optusnet.com.au>


"sm" <imfeaw5672@pacbell.net> wrote in message
news:rXPQf.38034$_S7.16680@newssvr14.news.prodigy.com...
> Here is "perl -V"
>
> --> perl -V
> Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
>   Platform:
>     osname=MSWin32, osvers=5.0, archname=MSWin32-x86-multi-thread

Note that it says "MSWin32".

>     uname=''
>     config_args='undef'
>     hint=recommended, useposix=true, d_sigaction=undef
>     usethreads=define use5005threads=undef useithreads=define
> usemultiplicity=define
>     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
>     use64bitint=undef use64bitall=undef uselongdouble=undef

Note that  "use64bitint=undef" and "use64bitall=undef"

Looks like this is just the standard 32-bit ActiveState perl. Probably
simplest to use 'ppm' to install whatever modules you want - assuming 'ppm'
works ok for you .... does it ?

Other than that, the best option is to use the (32-bit compiler) MSVC++ 6.0
(which is not freely available).

If you want a freely available compiler to work with ActiveState perl:
1) Install MinGW and ExtUtils::FakeConfig. This is *my* preferred
alternative, but it may not be everybody's preferred alternative. If you
upgrade to ActiveState build 815, you won't need to install
ExtUtils::FakeConfig -as build 815 (and subsequent releases) work seamlessly
with MinGW.
2) Install the freely available .NET 2003 command line compiler, available
from Microsoft. Google for it.

Cheers,
Rob




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

Date: Mon, 13 Mar 2006 11:46:26 +0100
From: Josef =?ISO-8859-2?Q?M=F6llers?= <1700-820@onlinehome.de>
Subject: Re: Paths help
Message-Id: <dv3ii9$6li$1@online.de>

Tad McClellan wrote:

> Josef Möllers <1700-820@onlinehome.de> wrote:

>> (Note that some OSes do
>> not mind if you wrote a//path//to//a//file).
> 
> 
> And those OSes include the OP's platform (Windows) if I am not mistaken.

You are ;-)
A forward slash is an option indicator in DOS (and those OSes that are built
on top of it).
If you mean that Windows doesn't mind multiple backslashes:
copy a\\path\\to\\a\\file somewhere\\else
you may be right (I usually avoid those OSes if possible).

> Backslashes are not a problem in Windows filesystems.

IMHO backslashes are not really part of a filesystem. They are part of the
code that dissects paths and traverses through a filesystem:
- on Linux and UNIX OSes, a forward slash is used, even when accessing a FAT
or NTFS partition,
- on Windowses, a backslash is used, even when accessing an ext2 FS (there
exists at least one ext2-FS-driver for Windows).

> Backslashes are a problem in some "command inter
> preters" (shells). 

ACK.

> (when you are using a GUI, there is no shell, so try using forward
>  slashes in a GUI file requester. I'll betcha it works just fine.
> )

Works fine (on Linux B-{) dunno with Windows (see remark above)
Backslashes don't work in konqueror.

>> Beware that if you passed a pathname to a Perl-builtin, then perl will
>> automagically convert forward slashes to a backslashes.
> 
> 
> I don't think that is true.
> 
> Is there a place in the std docs that supports that?

Can't find one by quickly skipping through the Camel Book, but I recall
numerous remarks in this group that you could use either
open(my $handle, '<', 'A:path\to\a\file')
or
open(my $handle, '<', "A:path/to/a/file")
and that perl would convert the slashes if needed and that the latter was
preferred.

> I think if you passed a forward-slashed pathname to a Perl-builtin,
> it works unchanged (because there is no command interpreter involved,
> perl goes to the system libraries directly).

Yes, but what happens if you called the Windows "open" library function with
a string containing forward slashes?

> But I could well be wrong, having never programmed on Windows...

BTDT. Confused my friend because the program I wrote for him used forward
slashes even on the GUI B-{)

>    Am I wrong?

Maybe I am.

But then ... I might learn something new.

Josef
-- 
josef punkt moellers bei gmx punkt de


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

Date: Mon, 13 Mar 2006 13:11:37 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Paths help
Message-Id: <Xns97855377556F9asu1cornelledu@127.0.0.1>

Josef Möllers <1700-820@onlinehome.de> wrote in
news:dv3ii9$6li$1@online.de: 

> Tad McClellan wrote:
> 
>> Josef Möllers <1700-820@onlinehome.de> wrote:
> 
>>> (Note that some OSes do
>>> not mind if you wrote a//path//to//a//file).
>> 
>> 
>> And those OSes include the OP's platform (Windows) if I am not
>> mistaken. 
> 
> You are ;-)
> A forward slash is an option indicator in DOS (and those OSes that are
> built on top of it).
> If you mean that Windows doesn't mind multiple backslashes:
> copy a\\path\\to\\a\\file somewhere\\else
> you may be right (I usually avoid those OSes if possible).

You are mistaken.

Tad distinguished between the OS API versus shell behavior in his post.

Windows has no problems with, for example,

opendir my $dir, 'C:/Program Files/Common Files' or die $!;

(assuming the path exists).

In addition, in recent versions of cmd.exe:

C:\> cd "/program files/common files"

C:\Program Files\Common Files>

 ...

>>> Beware that if you passed a pathname to a Perl-builtin, then perl
>>> will automagically convert forward slashes to a backslashes.
>> 
>> 
>> I don't think that is true.
>> 
>> Is there a place in the std docs that supports that?
> 
> Can't find one by quickly skipping through the Camel Book, but I
> recall numerous remarks in this group that you could use either
> open(my $handle, '<', 'A:path\to\a\file')
> or
> open(my $handle, '<', "A:path/to/a/file")
> and that perl would convert the slashes if needed and that the latter
> was preferred.

There is no conversion going on. The underlying Win32 API to which these 
paths are passed does not care which way the slashes lean.

>> I think if you passed a forward-slashed pathname to a Perl-builtin,
>> it works unchanged (because there is no command interpreter involved,
>> perl goes to the system libraries directly).
> 
> Yes, but what happens if you called the Windows "open" library
> function with a string containing forward slashes?

It works. If I am not mistaken, it has worked since DOS 2.

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

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



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

Date: Mon, 13 Mar 2006 14:33:52 +0100
From: Josef =?ISO-8859-2?Q?M=F6llers?= <1700-820@onlinehome.de>
Subject: Re: Paths help
Message-Id: <dv3sc2$o3g$1@online.de>

A. Sinan Unur wrote:

> Josef Möllers <1700-820@onlinehome.de> wrote in
> news:dv3ii9$6li$1@online.de:
> 
>> Tad McClellan wrote:
>> 
>>> Josef Möllers <1700-820@onlinehome.de> wrote:
>> 
>>>> (Note that some OSes do
>>>> not mind if you wrote a//path//to//a//file).
>>> 
>>> 
>>> And those OSes include the OP's platform (Windows) if I am not
>>> mistaken.
>> 
>> You are ;-)
>> A forward slash is an option indicator in DOS (and those OSes that are
>> built on top of it).
>> If you mean that Windows doesn't mind multiple backslashes:
>> copy a\\path\\to\\a\\file somewhere\\else
>> you may be right (I usually avoid those OSes if possible).
> 
> You are mistaken.
> 
> Tad distinguished between the OS API versus shell behavior in his post.
> 
> Windows has no problems with, for example,
> 
> opendir my $dir, 'C:/Program Files/Common Files' or die $!;
> 
> (assuming the path exists).
> 
> In addition, in recent versions of cmd.exe:
> 
> C:\> cd "/program files/common files"
> 
> C:\Program Files\Common Files>
> 
> ...
> 
>>>> Beware that if you passed a pathname to a Perl-builtin, then perl
>>>> will automagically convert forward slashes to a backslashes.
>>> 
>>> 
>>> I don't think that is true.
>>> 
>>> Is there a place in the std docs that supports that?
>> 
>> Can't find one by quickly skipping through the Camel Book, but I
>> recall numerous remarks in this group that you could use either
>> open(my $handle, '<', 'A:path\to\a\file')
>> or
>> open(my $handle, '<', "A:path/to/a/file")
>> and that perl would convert the slashes if needed and that the latter
>> was preferred.
> 
> There is no conversion going on. The underlying Win32 API to which these
> paths are passed does not care which way the slashes lean.
> 
>>> I think if you passed a forward-slashed pathname to a Perl-builtin,
>>> it works unchanged (because there is no command interpreter involved,
>>> perl goes to the system libraries directly).
>> 
>> Yes, but what happens if you called the Windows "open" library
>> function with a string containing forward slashes?
> 
> It works. If I am not mistaken, it has worked since DOS 2.

I stand corrected.
I'll try to refrain from claiming to know anything about Windows ;-)

Josef
-- 
josef punkt moellers bei gmx punkt de


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

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


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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

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

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


------------------------------
End of Perl-Users Digest V10 Issue 9048
***************************************


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