Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Can Perl (without XS) write to a specific machine address?

by Anonymous Monk
on Dec 19, 2005 at 17:13 UTC ( #517807=note: print w/ replies, xml ) Need Help??

in reply to What Perl CAN'T do?

If I have a bit of memory mapped hardware, how do I get Perl to access that hardware, without resorting to XS, or otherwise stepping outside the language features described iin the perlfunc and perlop man pages?

I can't think of a way -- even a bad one. Is there one?


Comment on Can Perl (without XS) write to a specific machine address?
Replies are listed 'Best First'.
Re: Can Perl (without XS) write to a specific machine address?
by Celada (Monk) on Dec 19, 2005 at 21:46 UTC

    The question is not fair.

    In any language, unless you are programming in the kernel, you will require the mmap system call in order to access memory mapped hardware. By restricting to what's described in the perlfunc and perlop manpage, you are forbidding use of mmap.

    So notwithstanding your restriction, it's actually just as easy to do in Perl as in C: In C, use mmap(), in Perl use Sys::Mmap.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://517807]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2015-10-14 04:27 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (320 votes), past polls