in reply to source the license and run the program in perl
Getting your example working shouldnt be hard, your changing your environment though did you mean to ? as that is most likely why it wouldnt run... if you are starting out in perl, first thing to do is to add use strict and warnings, you should read why this is important on other nodes on perlmonks, however simply but it enforces correct programming and warns you if you have done something a dodge. That said in your example - what is the benefit of doing it in perl rather than sh ?...
#!/usr/bin/perl -w use strict; my $status1 = qx|source /ICT/synplicity/synplify/8.6.2/.cshrc_synplify +_8.6.2|; # Define the program you are calling my $status2 = qx|synplify_pro|; print "Status 1 is $status1, status2 is $status2\n";
This is of course not fully tested with your example but should do as you think... Seeing as you look to be dealing with unix admin tasks I think the O'Reilly book Perl for System Administration may help you..
</code>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: source the license and run the program in perl
by ykchan (Initiate) on May 17, 2007 at 16:55 UTC |