On Mon, 2008-09-29 at 01:05 -0700, Funny Perl wrote: > I just start to learn perl on GD graph. My OS is Linux. > > I got a example, but how can I display the graph on the screen ? use > Gtk2 or something else?
The quickest way is to use system and the open command for your desktop. For GNOME, there is gnome-open, gopen, and openapp. my $file = 'some_name.png'; open my $fh, '>:raw', $file or die "cannot open $file: $!\n"; print $fh $gd->png() or die "cannot print to $file: $!\n"; close $fh or die "cannot close $file: $!\n"; system( "gnome-open $file" ); See: perldoc -f binmode perldoc -f system man gnome-open man gopen man openapp You can also use a web browser. Make sure you use the file's full path. use Cwd; my $dir = cwd(); system( "firefox $dir/$file" ); -- Just my 0.00000002 million dollars worth, Shawn Linux is obsolete. -- Andrew Tanenbaum -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/