On Dec 8, 2007 9:57 PM, Mark <[EMAIL PROTECTED]> wrote:
> I have a simple question regarding file manipulation.  I am trying to open a
> file using a program (e.g. word, excel, etc.) and then perform an action on
> it using the program and save it as a new file name.  If someone could point
> in the direction of an example of something like this.
>
> FYI, the program I am trying to use is not a commonly used software, like
> word or excel, but if I could somehow get an idea of how to open any
> document and perform an action on it, that would help.
>
> I have looked at the perlopen tuturial, but I  am still not sure how to
> accomplish this.  I just can't believe that it is as easy as,
> open(INFO,      "datafile") || die("can't open datafile: $!");  In other
> words how does it know what software to open the "datafile" with?
> If I could get a look at sample code of this, that would be a HUUGE help.
snip

The open function opens a file for read and/or writing by Perl, not by
another program.  If you want to "puppet string" another program into
opening a file you with need to find the "strings" it uses.  On Win32
this is often OLE, dbus is popular with GNOME programs, etc.  Often it
is easier, and faster overall, to use a module that lets Perl directly
read and write the file in question.  What format is the file in?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to