On Fri, Jan 2, 2009 at 20:11, Mr. Shawn H. Corey <shawnhco...@magma.ca> wrote: > On Fri, 2009-01-02 at 05:35 -0800, Collaborate wrote: >> I should have stated my question in a more general sense. I can send >> the output to a text or an Excel file. Other file formats that I >> haven't yet explored may be possible. Instead of double clicking with >> the mouse on the created file's name to see what's in the file, I'd >> like the program to simulate the double clicking even. I was wondering >> if Perl can "open" a file, regardless of the file type. > > What windowing system? > > Linux+GNOME: > system( "gnome-open $file" ); snip
On OS X it is system "/usr/bin/open", $file; I thought Win32 could do something similar with the start command, but it doesn't seem to work, so you will have to know the right program an say something like this: my %prog = ( xls => "excel", doc => "word", etc => "etc" ); system $prog{$file_type}, $file; -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/