Wow, that was fast. Thanks. All good questions. OK, here's what I found when I looked at how I created
$outfile:
$0 =~ /(.*)\.pl/;
my $outname = "$1.pdf";
This was in a subroutine so
$outfile was local. I then tried to use it outside the subroutine so that was the problem. I removed the
my and now the above call works. I can also invoke just the name and that works too:
system $outname;
I tried this with
exec and I get:
There was an error opening this document. This file cannot be found.
and then it opens when I 'OK' the dialog. What is the syntax for
exec? I though it was the same.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.