I am able to accomplish this by checking for existance of file1 in while loop "if" condition.
-
my $firstfile = substr($file2,0,length($file2) - 4);
-
if ( -e "$firstfile"){
-
Thank you!
You have posted code into the forum without using proper code tags. It is best practice here on TSDN to wrap all code posted into the forum in code tags.
Code tags start with [code] and end with [/code]. If you need an example other than this one, the please refer to the REPLY GUIDELINES (or POSTING GUIDELINES if you are starting a discussion) to the right of the Message window. You will find the examples and suggestions for posting there.
In addition, you can also add the language to your code tags. Here is an example:
[code=perl]
<some code>
[/code]
Please know that I have fixed your posts above to include the proper code tags.
Please be sure and use code tags in all of your future posts here on TSDN.
- Moderator