Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Print Current Program Source Code

by Hofmator (Curate)
on Aug 18, 2006 at 10:55 UTC ( [id://568103]=note: print w/replies, xml ) Need Help??


in reply to Print Current Program Source Code

I'm not sure I get your question. Let me try to rephrase.

You have a file called 'hello_world.pl' with the content you have shown. On the command promt you type perl hello_world.pl and get the printed hello world as a return.

Now you would like to know how to get the text of the program printed out, instead of the program executed. This depends on your operating system. On Unix/Linux you type cat hello_world.pl and on Windows you type type hello_world.pl.

For how to do these things from perl, see the other answers.

-- Hofmator

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-25 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found