[25682] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7923 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 29 13:37:32 2005

Date: Tue, 29 Mar 2005 10:37:26 -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           Tue, 29 Mar 2005     Volume: 10 Number: 7923

Today's topics:
        Why doesn't Perl have cp or mv? <nobody@dev.null>
    Re: Why doesn't Perl have cp or mv? <shirsch@adelphia.net>
    Re: Why doesn't Perl have cp or mv? <nobody@dev.null>
    Re: Why doesn't Perl have cp or mv? <coscorrosa@SPAMSUCKS.comcast.net>
    Re: Why doesn't Perl have cp or mv? <theaney@cablespeed.com>
    Re: Why doesn't Perl have cp or mv? <notvalid@email.com>
    Re: Why doesn't Perl have cp or mv? <chbarts+usenet@gmail.com>
    Re: Why doesn't Perl have cp or mv? <matternc@comcast.net>
    Re: Why doesn't Perl have cp or mv? <matternc@comcast.net>
    Re: Why doesn't Perl have cp or mv? chris-usenet@roaima.co.uk
    Re: Why doesn't Perl have cp or mv? <1usa@llenroc.ude.invalid>
    Re: Why doesn't Perl have cp or mv? <matternc@comcast.net>
    Re: Why doesn't Perl have cp or mv? <nobody@dev.null>
    Re: Why doesn't Perl have cp or mv? <nobody@dev.null>
    Re: Why doesn't Perl have cp or mv? <nobody@dev.null>
        Will Programming Perl 4th ed be Perl5 or Perl6? <socyl@987jk.com.invalid>
    Re: Will Programming Perl 4th ed be Perl5 or Perl6? <postmaster@castleamber.com>
    Re: XML::LibXSLT element tags stripped out <nobull@mail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 26 Mar 2005 22:41:52 -0500
From: Andras Malatinszky <nobody@dev.null>
Subject: Why doesn't Perl have cp or mv?
Message-Id: <6Yp1e.74765$SF.27200@lakeread08>

Why is it that Perl emulates Unix commands like chmod and chown but not 
such basic operations like cp or mv?


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

Date: Sat, 26 Mar 2005 22:48:38 -0500
From: "Steven N. Hirsch" <shirsch@adelphia.net>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <lMGdncwcXeOLsNvfRVn-oA@adelphia.com>

Andras Malatinszky wrote:
> Why is it that Perl emulates Unix commands like chmod and chown but not 
> such basic operations like cp or mv?

perldoc File::Copy


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

Date: Sat, 26 Mar 2005 23:00:04 -0500
From: Andras Malatinszky <nobody@dev.null>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <8dq1e.74767$SF.56440@lakeread08>

Steven N. Hirsch wrote:
> Andras Malatinszky wrote:
> 
>> Why is it that Perl emulates Unix commands like chmod and chown but 
>> not such basic operations like cp or mv?
> 
> 
> perldoc File::Copy

Thanks. Unfortunately I didn't find the answer to my question in that 
doc. Perhaps, if it's not too much trouble, you could quote the relevant 
part?

Notice that the question was "why doesn't Perl emulate cp or mv?" or in 
other words, "why didn't the designer of Perl include a cp and an mv 
function?" rather than "how do I make up for the lack of cp or mv?"


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

Date: Sat, 26 Mar 2005 20:26:54 -0800
From: Ron Coscorrosa <coscorrosa@SPAMSUCKS.comcast.net>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <pan.2005.03.27.04.26.54.543457@SPAMSUCKS.comcast.net>

On Sat, 26 Mar 2005 22:41:52 -0500, Andras Malatinszky wrote:

> Why is it that Perl emulates Unix commands like chmod and chown but not 
> such basic operations like cp or mv?

Probably because chmod and chown are system calls, mv and cp aren't.

-- 
Ron Coscorrosa
http://coscorrosa.com



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

Date: Sat, 26 Mar 2005 23:33:47 -0500
From: Tim Heaney <theaney@cablespeed.com>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <87u0mx672s.fsf@mrbun.watterson>

Andras Malatinszky <nobody@dev.null> writes:

> Why is it that Perl emulates Unix commands like chmod and chown but
> not such basic operations like cp or mv?

Perl doesn't actually emulate the Unix *commands* chmod and chown,
rather it emulates the Unix *system calls* chmod and chown. Perl has
a rename command, which is just like the rename Unix system call.

The Unix chmod and chown commands are essentially wrappers around the
chmod and chown system calls, whereas the Unix cp and mv commands are
fairly sophisticated little programs; much more than just wrappers
around the rename system call. The Perl File::Copy module has the more
sophisticated copy and move functions in it (which you may even spell
cp and mv, if you prefer).


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

Date: Sun, 27 Mar 2005 06:06:03 GMT
From: Ala Qumsieh <notvalid@email.com>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <f3s1e.3169$zl.1893@newssvr13.news.prodigy.com>

Andras Malatinszky wrote:
> Why is it that Perl emulates Unix commands like chmod and chown but not 
> such basic operations like cp or mv?

FWIW, Perl does have a 'mv' command. It is called 'rename'.

--Ala



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

Date: Sun, 27 Mar 2005 00:04:43 -0700
From: Chris Barts <chbarts+usenet@gmail.com>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <0NKdnZTWxN-RxtvfRVn-gg@onewest.net>

Andras Malatinszky wrote:
> Why is it that Perl emulates Unix commands like chmod and chown but not 
> such basic operations like cp or mv?

Because Perl is a programming language, and programming languages don't 
usually name functions after other programs.

chmod and chown are system calls into Unix and Unix-like OSes that are 
commonly available as functions in languages like C and C++. Perl has 
made them part of itself and emulated them even on OSes that don't 
provide them (they may not do anything useful, however). The programs 
chmod and chown are simply wrappers around those system calls which have 
the same name.


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

Date: Sun, 27 Mar 2005 08:10:38 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <q5WdnaA0gfpTLdvfRVn-qA@comcast.com>

Andras Malatinszky wrote:

> Why is it that Perl emulates Unix commands like chmod and chown but not
> such basic operations like cp or mv?

perldoc File::Copy

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


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

Date: Sun, 27 Mar 2005 08:11:37 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <q5WdnaM0gfqULNvfRVn-qA@comcast.com>

Andras Malatinszky wrote:

> Steven N. Hirsch wrote:
>> Andras Malatinszky wrote:
>> 
>>> Why is it that Perl emulates Unix commands like chmod and chown but
>>> not such basic operations like cp or mv?
>> 
>> 
>> perldoc File::Copy
> 
> Thanks. Unfortunately I didn't find the answer to my question in that
> doc. Perhaps, if it's not too much trouble, you could quote the relevant
> part?
> 
> Notice that the question was "why doesn't Perl emulate cp or mv?" or in
> other words, "why didn't the designer of Perl include a cp and an mv
> function?" rather than "how do I make up for the lack of cp or mv?"

File::Copy enables you to do copies and moves.  I don't understand your
point.

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


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

Date: Sun, 27 Mar 2005 14:58:51 +0100
From: chris-usenet@roaima.co.uk
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <rpqih2-ic5.ln1@news.roaima.co.uk>

Ala Qumsieh <notvalid@email.com> wrote:
> FWIW, Perl does have a 'mv' command. It is called 'rename'.

No... they're subtly different. mv(1) will move a file between
filesystems; rename(2) won't. See the man page for rename, particularly
the EXDEV error case.

CHris


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

Date: Sun, 27 Mar 2005 15:23:47 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <Xns962669C3BCEC1asu1cornelledu@127.0.0.1>

Chris Mattern <matternc@comcast.net> wrote in news:q5WdnaA0gfpTLdvfRVn-qA@comcast.com:

> Andras Malatinszky wrote:
> 
>> Why is it that Perl emulates Unix commands like chmod and chown but not
>> such basic operations like cp or mv?
> 
> perldoc File::Copy
> 

OTOH, I remember Abigail having some objections to File::Copy. 
They made sense to me so here is a reference:

<URL: http://groups-beta.google.com/group/comp.lang.perl.misc/msg/18b26366b3aad30a?dmode=source>

<URL: http://tinyurl.com/3prlb>

Sinan


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

Date: Sun, 27 Mar 2005 10:52:22 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <X-adnYpyQeErS9vfRVn-iA@comcast.com>

chris-usenet@roaima.co.uk wrote:

> Ala Qumsieh <notvalid@email.com> wrote:
>> FWIW, Perl does have a 'mv' command. It is called 'rename'.
> 
> No... they're subtly different. mv(1) will move a file between
> filesystems; rename(2) won't. See the man page for rename, particularly
> the EXDEV error case.
> 
mv also allows to name a directory as a destination, and name multiple
files to be moved if you do.

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


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

Date: Sun, 27 Mar 2005 11:16:01 -0500
From: Andras Malatinszky <nobody@dev.null>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <5%A1e.74790$SF.39515@lakeread08>

Chris Mattern wrote:
> Andras Malatinszky wrote:
> 
> 
>>Steven N. Hirsch wrote:
>>
>>>Andras Malatinszky wrote:
>>>
>>>
>>>>Why is it that Perl emulates Unix commands like chmod and chown but
>>>>not such basic operations like cp or mv?
>>>
>>>
>>>perldoc File::Copy
>>
>>Thanks. Unfortunately I didn't find the answer to my question in that
>>doc. Perhaps, if it's not too much trouble, you could quote the relevant
>>part?
>>
>>Notice that the question was "why doesn't Perl emulate cp or mv?" or in
>>other words, "why didn't the designer of Perl include a cp and an mv
>>function?" rather than "how do I make up for the lack of cp or mv?"
> 
> 
> File::Copy enables you to do copies and moves.  I don't understand your
> point.
>

You obviously don't.


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

Date: Sun, 27 Mar 2005 11:19:33 -0500
From: Andras Malatinszky <nobody@dev.null>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <p2B1e.74791$SF.55693@lakeread08>

Ala Qumsieh wrote:
> Andras Malatinszky wrote:
> 
>> Why is it that Perl emulates Unix commands like chmod and chown but 
>> not such basic operations like cp or mv?
> 
> 
> FWIW, Perl does have a 'mv' command. It is called 'rename'.
> 
> --Ala
> 
Good point, thanks.


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

Date: Sun, 27 Mar 2005 11:21:28 -0500
From: Andras Malatinszky <nobody@dev.null>
Subject: Re: Why doesn't Perl have cp or mv?
Message-Id: <c4B1e.74792$SF.46447@lakeread08>

Tim Heaney wrote:
> Andras Malatinszky <nobody@dev.null> writes:
> 
> 
>>Why is it that Perl emulates Unix commands like chmod and chown but
>>not such basic operations like cp or mv?
> 
> 
> Perl doesn't actually emulate the Unix *commands* chmod and chown,
> rather it emulates the Unix *system calls* chmod and chown. Perl has
> a rename command, which is just like the rename Unix system call.
> 
> The Unix chmod and chown commands are essentially wrappers around the
> chmod and chown system calls, whereas the Unix cp and mv commands are
> fairly sophisticated little programs; much more than just wrappers
> around the rename system call. The Perl File::Copy module has the more
> sophisticated copy and move functions in it (which you may even spell
> cp and mv, if you prefer).


I see. Thanks very much.


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

Date: Sun, 27 Mar 2005 00:31:49 +0000 (UTC)
From: kj <socyl@987jk.com.invalid>
Subject: Will Programming Perl 4th ed be Perl5 or Perl6?
Message-Id: <d24utl$nv9$1@reader1.panix.com>




Does anyone have any info on whether the next edition of Programming
Perl will come out before or after the official release of Perl6?

Thanks!

kj


-- 
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.


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

Date: 27 Mar 2005 03:18:15 GMT
From: John Bokma <postmaster@castleamber.com>
Subject: Re: Will Programming Perl 4th ed be Perl5 or Perl6?
Message-Id: <Xns9625D8B7C971castleamber@130.133.1.4>

kj wrote:

> Does anyone have any info on whether the next edition of Programming
> Perl will come out before or after the official release of Perl6?

I hope there will be two books, a 4th edition focussing on Perl5, and a 
new, rewritten version for Perl6.

I also hope a well known perl hacker will help writing Perl 6 1st edition 
:-D.

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


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

Date: Wed, 23 Mar 2005 08:42:28 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: XML::LibXSLT element tags stripped out
Message-Id: <d1r9qn$mcl$1@sun3.bham.ac.uk>



Abro Gaticus wrote:

> Being extremely new to XML::LibXSLT and XML/XSL in general I have what
> I am assuming is a very newb question.

It is, and not a Perl one - it is a pure XSL one.

> I created a simple XML file, a simple XSL file, and a simple perl
> script that uses XML::LibXSLT to perform the transformation.
> Everything seems to work correctly except that in the result document
> none of the element tags are output, only their values.

This is the effect of the default XSL trasformation.

>  <xls:output
> method="xml"/> is ignored.  I find this strange as I have read
> documentation that 'xml' should be the default output method anyway.

AFAIK, it is.

> Perhaps someone can suggest what I am doing incorrectly.

You are wrongly assuming that the default XSL transformation is the 
identity transformation.

Read about the default XSL tranformation here:

   http://www.w3.org/TR/xslt#built-in-rule

If you want to copy elements you need to add an explicit template to do so.

   http://www.w3.org/TR/xslt#copying



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

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


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