Please use a better subject line.... > I really need help with that system call thing! Here it is again: >
Patience is a virtue... > Hi List, > > I have code that looks like this: > > > # > #:# > #:#:#:#:# > #:#:#:#:#:# What's with the excessive comments? > my $funk = '/home/jdd/sbin/idlwave2outline.pl'; > my $jam = '/home/jdd/sbin/outline2html.pl -p -t'; You are setting yourself up to call two Perl programs in a pipe, why bother? Better to take like components, develop a library and then call the interfaces directly. > my $web_dir = '/home/jdd/www'; > ....Stuff Happens Not terribly informative, let's hope that isn't where the problem is... > #:#:#:#:#:# > #:#:#:#:# > #:# > # # > #:# > #:#:#:#:# > #:#:#:#:#:# > sub makedocs { One of the reasons why you may not get much assistance is that your current code looks like a time sink because your functions are not encapsulated. In general subroutines should take arguments and return values... > $code = $File::Find::name; > $name = $web_dir.'/'.$_; Where did these two come from? I assume your call to File::Find has been tested... > system("$funk $code | $jam > $name.html") if (/\.pro$/ || /\.idl$/); perldoc -f system System isn't likely returning what you think it is. Speaking of which, it might help if you told us what you are expecting it to return since we know nothing about the sequence of programs you are using. perldoc perlipc > } > #:#:#:#:#:# > #:#:#:#:# > #:# > # > > > Now, whenever I run this I get an error in the system call: > > Can't open -p: No such file or directory > Can't open -t: No such file or directory > Which leads me to believe outline2html is expecting file arguments and doesn't recognize -p and -t as switches. > which is just saying that it cannot open the command line options that > I'm trying to pass to outline2html.pl. So what is the right way to get > those options through? > Depends on outline2html.pl which I (we) are not familar with. > Is there a way to call external perl scripts other than using the > system() function? Backticks, qx(), but then it is usually discouraged, why call a program written in the same language by shelling out? perldoc perlop http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>