RE: Wrapper Script
exec '/bin/original-print-something', @processed_args or die Couldn't exec /bin/original-print-something: $!; My problems come when I get a command-line like this: # cat /etc/hosts | /bin/print-something -a -b some-option -c someother-option In this case, my LOG file will recored the args as -a -b some-option -c someother-option, but not the piped input. Where did it go? Is there a variable that will contain that piped data so I can manipulate that stuff, too? I'm just a beginner myself, but you may want to look into the diamond operator, . From the little that I've learned about (and used) it, you can use it to write code that will support input/output piping. If you've got a copy of 'Learning Perl' there's some information on it. I'm sure there are web docs too. --Errin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Wrapper Script
(I'm mailing this after posting through Google Groups. I didn't see it get posted, so I'm sending email instead. I hope this doesn't double post. If it does, I'm sorry.) Hi Perl folks, I am trying to write a wrapper script around an executable file so that I am able to better control the results of other programs calling that file. I have written a short and easy script that collects the options in a log file, and then execs the original command (just for testing). #!/usr/bin/perl use strict; use warnings; my $datestampe = localtime(time); open LOG, /tmp/options.log or die Can't open /tmp/options.log: $!; print LOG $datestamp: Command and options: $0 @ARGS; exec( '/usr/bin/original-executable', @ARGS); However, I have found that some open the original file in a pipe. Is there a way I can view the contents of what is being sent through the pipe? Thanks, --Errin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Wrapper script for MS Visual Basic
Hi All, A question from a non programmer? My task is to convert any MS Suite files to html on my local machine as part of a document collation and compression program written in perl. The existing Perl scripthas plugins for .doc and .txt but not other file extensions. My thoughts are to call Visual Basic macros as a temporary work around measure. Any directions ideas please Win98SE Active Perl 5.6.1 Bill McNatty [EMAIL PROTECTED]