Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Redirecting output to folder

by manishrathi (Beadle)
on Jul 17, 2011 at 14:21 UTC ( [id://914954]=perlquestion: print w/replies, xml ) Need Help??

manishrathi has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to redirect output of a perl module to a folder on desktop as follows, but I am getting the message "Access denied"

C:\Users\Admin>perldoc File::Copy > "C:/Users/Admin/Desktop/TeamSite Perl Modules" Access is denied.

Why am I getting such a messsage. How can I output perl module content to a folder ?

Thanks

Replies are listed 'Best First'.
Re: Redirecting output to folder
by roboticus (Chancellor) on Jul 17, 2011 at 16:13 UTC

    manishrathi:

    You're getting the message because the user executing the script doesn't have permissions to write to the location specified. It's not a perl issue, you'll need to talk to the system administrator to either grant the appropriate permissions, or find another location to use as the file destination.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

Re: Redirecting output to folder
by Jim (Curate) on Jul 17, 2011 at 16:54 UTC

    You're probably getting the error message because "TeamSite Perl Modules" is a folder, not a file. You need to redirect the standard output of the perldoc utility to a text file within the folder, not directly to the folder itself.

    Do this:

    C:\Users\Admin>perldoc File::Copy > "C:\Users\Admin\Desktop\TeamSite P +erl Modules\File-Copy.txt"

    You could also use the -d option of the perldoc utility instead of I/O redirection, like this:

    C:\Users\Admin\Desktop\TeamSite Perl Modules>perldoc -d File-Copy.txt +File::Copy

    Jim

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-29 13:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found