Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: PERL newbie Cant figure out where to start

by TedPride (Priest)
on May 01, 2006 at 19:11 UTC ( [id://546735]=note: print w/replies, xml ) Need Help??


in reply to PERL newbie Cant figure out where to start

If I'm correct, you want the script to open the file and print just the permissions listing for the directory. The following will work:
use strict; use warnings; open(IN, "xcacls.txt") or die "Cant open file: $!\n"; ##### Puts file into $_ all at once, rather than just a ##### line at a time. $_ = do { local $/; <IN> }; ##### Matches the section bounded by lines of 74 *'s ##### that has Directory: in its first line. m/\*{74}\n(Directory: .*?)\*{74}/s; ##### Print the first part of the match (the first ##### section in parentheses) print $1; close(IN);

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found