Thursday, January 10, 2013

Opening Files in Perl (Different File Types)

Windows

open(MYFILE, "C:\\Windows\\users\\pierce\\novel.txt") || die; # Right, but messy.

VMS

open(MYFILE, "DISK5:[USER.PIERCE.NOVEL]") || die; # VMS

Mac

open(MYFILE, "Drive:folder:file") || die; # Macintosh

UNIX

open(MYFILE, "/usr/pierce/novel") || die; # Unix.

No comments:

Post a Comment