What can one print to in perl? can you, say,

open(PRINTER,'/dev/lp0');$stuff="stuff";print PRINTER "$stuff";

and use that to talk to devices? also, can you use print to a memory location? I'm not too knowledgable in memory, but would something like

print 0x384A "AF83";

work? the memory address was of course made up and so was the hex i sent there and i'm not sure if i need to make a file handle or something. Of course that wouldn't work cause there is no buffer, and i don't feel like getting into all of that, but if i did print to a real address like that, keeping a buffer full of course with real information, would it work? If that is not how one does it, how does one speak to devices and memory locations in perl? There must be some way, and I'd like to know it. It would bring me one step closer to writing TNT2 opengl drivers in perl :)

@:::::::((==========Rydor====>

In reply to print to memory? by Rydor

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.