in reply to combine two scripts in to one

the first script is

@files =<C:\\orant\\FORMS60\\forms\\Fapidk\\source\\msvc\\changecolor\ +\Debug\\forms\\*.fmb>; foreach $file (@files) { print $file "\n"; system "changecolor.exe form=$file"; }

the above script gets all the fmb and changes the properties of some of the items in some of the fmb files and saves the updated file to a different directory the secod script goes through the updated file and compiles the form .


the second script is
@files1 =<C:\\orant\\FORMS60\\forms_up\\*.fmb>; done and thanks for all of ur help. foreach $file (@files1) { print $file . "\n"; system "IFCMP60 USERID=rmetts/rmetts\@dlegtst1 module=$file module_ac +cess=file module_type=form" # print "c:\\orant\\bin\\IFCMP60 USERID=rmetts/rmetts\@dlegtst1 modul +e=$file module_access=file module_type=form" }
can any one help me on combining these two scripts into one. thanks for your help.
I did copy both of these scripts into one file but it seems to be running the first script and not the second one.

Replies are listed 'Best First'.
Re: combine two scripts into one
by marto (Cardinal) on May 14, 2007 at 15:30 UTC
    Hi subha,

    I notice you are quite new to PerlMonks, welcome to the Monastery. That said please read the PerlMonks FAQ and How do I post a question effectively?. Using code tags makes it easier for people to read the code you have posted. Regards your Perl question, this seems to be based on one of the answers to your previous question, which you have used to make two working scripts. Have you tried combining them into one file, the contents of the second script following the second?

    Also, if these are the complete working scripts I see no use strict; or use warnings;, or even a shebang line.

    Hope this helps

    Martin
      I did format my message and I tried the option of combing two scripts into one file but only the first part is being executed. thanks for your response.
        Please mark your posts as being Updated if you change them after you post them.

        Thanks

        Martin
Re: combine two scripts into one
by swampyankee (Parson) on May 14, 2007 at 19:09 UTC

    The first, and most obvious, check is to see if @files1 is populated. If it's empty, the foreach loop will be skipped, and it will appear that the program isn't running this part of the code. If @files1 should be populated, but isn't, check to make sure that the script has permissions to read the directory; it may not if, for example, this is a CGI script.

    emc

    Insisting on perfect safety is for people who don't have the balls to live in the real world.

    —Mary Shafer, NASA Dryden Flight Research Center