my $winopt = {Device => '/GW', WindowWidth => 7, Aspect => 1};

Afaik, this hashref is specific to PGPLOT, but you've commented out the line that will load PGPLOT - so a strange error is not unexpected. I could be wrong about this, however. As mentioned elsewhere, ask on the PDL list.

The second piece of code you posted will output a nice png file (minus the "close" image) if you set the PGPLOT_DEV environment variable to /PNG. The name of the output file will be pgplot.png - at least that's what happens for me. I don't know offhand what's needed to get rid of that "close" box. If I make progress with any of this later on tonight I'll update this post.

UPDATE: One simple way to avoid the "close" box is to add the line <STDIN>; to the bottom the script.
Then, with the focus returned to the cmd.exe console, hit "Enter" when you're ready to close the graphics window, and the "close" box should appear. Or you could just do a sleep 5; instead. In other words, that "close" box shouldn't pop into existence until the script is about to exit.

... but here:http://sourceforge.net/apps/mediawiki/pdl/index.php?title=Installing_PDL_on_Windows ..

UPDATE: What follows is rubbish - both "cpan.uwinnipeg.ca" and "theoryx5.uwinnipeg.ca" have been around for ages - and it has taken me all this time to notice that. The webpage I mention below as being in need of amendment is fine the way it is.

The information at http://sourceforge.net/apps/mediawiki/pdl/index.php?title=Installing_PDL_on_Windows will need to be updated. There seems to have been a migration from "theoryx5.uwinnipeg.ca" to "cpan.uwinnipeg.ca" - perhaps the migration is still taking place, as the 5.6 and 5.8 repos are still under "theoryx5". I'll update that page when I find out what's going on.

Cheers,
Rob

In reply to Re: PDL questions by syphilis
in thread PDL questions by Anonymous Monk

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.