Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: shell problem

by graff (Chancellor)
on Aug 06, 2002 at 03:01 UTC ( #187901=note: print w/replies, xml ) Need Help??


in reply to Re: shell problem
in thread Trying to convert shell script to Perl

I don't think this approach will work any better than what the seeker posted. The problem is that the values being assigned to "$DIR" all have the line-termination character(s) attached (/[\r\n]+/), whereas this was not the case for the original shell script. You either have to "chomp $DIR" or else use the "opendir()" and "readdir()" calls, as demonstrated by DDA below.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://187901]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2021-01-15 15:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?