Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hi jesuashok where do you get "equivalent built in functions" between those two lists?
  • chdir
  • - Changes the working directory to EXPR - you can't do this with system("cd $dir"); or $ENV{PWD} = $dir; - chdir looks like a good option :o)
  • opendir
  • - Opens a directory named EXPR for processing by readdir, telldir, seekdir, rewinddir, and closedir. - what else could you use to do that?
  • readdir
  • - Returns the next directory entry for a directory opened by opendir. I guess you could fudge that up by using ls, but using readdir from within Perl is more simple and efficient.
  • closedir
  • - Closes a directory opened by opendir - how could you do that?
  • symlink
  • - sure, you could do system ("ln -s $orig $link"); but why complicate things, and why ask someone else to do something you can easily do yourself and then know the result straight away?
  • open
  • - there are many ways to read data out of file, using open within perl is certainly a good one. Using backticks and cat or something like that would not be likely to win you any "well done" prizes.
  • read
  • - Attempts to read LENGTH characters of data into variable SCALAR from the specified FILEHANDLE.
  • close
  • - Closes the file or pipe associated with the file handle - again, what are you proposing to do this with?

In reply to Re: comparison between system operators and Built in function by serf
in thread comparison between system operators and Built in function by jesuashok

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found