in reply to Re: UNIX shell commands in Windows
in thread UNIX shell commands in Windows

The best reply to the OP but I wouldn't slurp the file up all at once (who knows how big it would be).

Duh! use File::Copy.

-derby

Replies are listed 'Best First'.
Re^3: UNIX shell commands in Windows
by ikegami (Patriarch) on Jun 23, 2005 at 17:06 UTC
    How is it better than File::Copy? It slurps the entire file into memory, doesn't check for errors and doesn't handle non-text files.

      Damn ... I didn't realize File::Copy was core. I'm getting too old and forgetting a lot of what I never even knew. ++ikegami, --derby.

      -derby

        re File::Copy - ok it is core so fine to use, although I admit I don't look for a module as much as I could because I can only use core modules in production, so i tend to have to reinvent the wheel a lot

        re text files - undefining $/ does support text files.

        re slurp into memory - the exact behaviour, whether full slurp or buffered (I would expect fixed size buffering to match i/o page size if so) is a bit off-piste here I think.

        re error handling. yes of course, but error handling when done properly will be called up from some other project module - also an off-piste topic.