Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: comparison between system operators and Built in function

by serf (Chaplain)
on Jan 19, 2006 at 03:26 UTC ( #524116=note: print w/replies, xml ) Need Help??


in reply to comparison between system operators and Built in function

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?
  • Comment on Re: comparison between system operators and Built in function

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://524116]
help
Chatterbox?
Corion idly wonders about creating a series of HTTP requests. There seems to be no framework to generate a series of HTTP requests, like "try all these requests"
[Corion]: This is vaguely inspired by that list of "nasty" strings, which I'd like to replace among HTTP parameters, just to see whether the application crashes, but also for easy downloading of a list of URLs etc

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2017-01-16 15:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (151 votes). Check out past polls.