473,408 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

.pl working fine but .exe not works

Hi All,

Please see my below code.
Expand|Select|Wrap|Line Numbers
  1. my $dir = $ARGV[0];         #Getting command line argument (path of the file)
  2.  
  3. foreach $file (<$dir*.xml>)  # Error here when i run exe only.
  4.  
In my above code, as a pl file working fine, But after convert into exe it's not working. Please suggest.

Thanks
vishwa
Oct 3 '07 #1
3 1712
numberwhun
3,509 Expert Mod 2GB
Hi All,

Please see my below code.
Expand|Select|Wrap|Line Numbers
  1. my $dir = $ARGV[0];         #Getting command line argument (path of the file)
  2.  
  3. foreach $file (<$dir*.xml>)  # Error here when i run exe only.
  4.  
In my above code, as a pl file working fine, But after convert into exe it's not working. Please suggest.

Thanks
vishwa
First, please place code tags around your code, not lines to separate it from the rest of your post.

Second, what are you using to convert your file to a .exe?

Regards,

Jeff
Oct 3 '07 #2
First, please place code tags around your code, not lines to separate it from the rest of your post.

Second, what are you using to convert your file to a .exe?

Regards,

Jeff
Dear Jeff,

#The below is my complete code.
# I am trying to parse all XML file in a single folder.
# So I want list of XML file Names Only to write a batch file

Expand|Select|Wrap|Line Numbers
  1. open (F1, ">parseAll.bat") ||die ("Cant open the file $!");
  2. my $dir = $ARGV[0]; # Folder Path
  3. foreach $file (<$dir*.xml>)
  4. {
  5. print "$file\n";
  6. $err=(split /\./, $file)[0];
  7.  
  8. $errlog="$err".".par"; #Assigning a value same XML name but exten.par
  9. $_ .= "\\\\192.168.50.23\\software\\AllProjectMaster\\Projects\\Y2007\\2007-09\\SWR0300_Scon\\Parser\\nsgmls -D \\\\192.168.50.23\\software\\AllProjectMaster\\Projects\\Y2007\\2007-09\\SWR0300_Scon\\Parser -f $errlog \\\\192.168.50.23\\software\\AllProjectMaster\\Projects\\Y2007\\2007-09\\SWR0300_Scon\\Parser\\xml\.dcl $file\n";
  10. }
  11. print F1 $_;
  12. close F1;
  13. system("parseAll.bat");
  14. unlink("parseAll.bat");
Thanks,
Raam.

Please suggest.
Oct 3 '07 #3
numberwhun
3,509 Expert Mod 2GB
Dear Jeff,

#The below is my complete code.
# I am trying to parse all XML file in a single folder.
# So I want list of XML file Names Only to write a batch file

Expand|Select|Wrap|Line Numbers
  1. open (F1, ">parseAll.bat") ||die ("Cant open the file $!");
  2. my $dir = $ARGV[0]; # Folder Path
  3. foreach $file (<$dir*.xml>)
  4. {
  5. print "$file\n";
  6. $err=(split /\./, $file)[0];
  7.  
  8. $errlog="$err".".par"; #Assigning a value same XML name but exten.par
  9. $_ .= "\\\\192.168.50.23\\software\\AllProjectMaster\\Projects\\Y2007\\2007-09\\SWR0300_Scon\\Parser\\nsgmls -D \\\\192.168.50.23\\software\\AllProjectMaster\\Projects\\Y2007\\2007-09\\SWR0300_Scon\\Parser -f $errlog \\\\192.168.50.23\\software\\AllProjectMaster\\Projects\\Y2007\\2007-09\\SWR0300_Scon\\Parser\\xml\.dcl $file\n";
  10. }
  11. print F1 $_;
  12. close F1;
  13. system("parseAll.bat");
  14. unlink("parseAll.bat");
Thanks,
Raam.

Please suggest.
Well, first, please do not top post when you reply. Place your new message below the quoted message you are replying to. Otherwise,

?
about
talking
are
you
what
know
anyone
will
how


Next, you posted a question saying that your code worked fine when it was a .pl extentioned file. Then, when you "converted" it to .exe, it stopped working. I asked you in my reply what you were using to do the conversion to an exe file and you still have not answered that question.

According to your posting, the conversion may have caused your code not to work.

What you have to keep in mind is that the module or program that you used to convert the script to a .exe is not perfect. The process is not guaranteed to work, nor is it foolproof. There is always a chance for problems. I have not used either method and don't see a need to since you can execute perl scripts without them being .exe files.

Regards,

Jeff
Oct 3 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jason S | last post by:
Hello Group, I am just about tearing my hair out with this one and thought someone may have some insight. I have a transform that wasn't working so I grabbed the nearest debugger (xselerator)...
5
by: Jeff Johnson | last post by:
I'm using forms authentication to protect a subfolder within my site. I've got it working fine except for two issues: (1) When I do a RedirectFromLogin page I have to put a cookie path ("/"...
8
by: Brad Simon | last post by:
I have written a shopping cart using ASP .NET (VB). It has been running quite successfully on a site for about a year or so. I use the SessionID as the key to hold information on the shopping...
5
by: tshad | last post by:
I have been working with setting my drop boxes to allow double clicking to select an item. It worked fine until I made some changes. I then stripped the page down to the bare essentials to find...
1
by: Alan Silver | last post by:
Hello, I have just copied a new site up to the production server and have encountered an odd problem. The site uses validation, and this seems to be working fine. For some reason, link button...
4
by: Pipo | last post by:
The problem: I create a very simple custom control: public class cLabel : System.Web.UI.WebControls.Label { } I place the cLabel in a user control. When I place the user control on a page...
3
by: Workaholic | last post by:
Hi, I have a problem that I have now seen on two different servers. I have a VB.Net application that is installed on the servers. It works fine on both servers. If I make a change to the...
2
latitude
by: latitude | last post by:
Have had a few questions here but no replies so far so thought id give it one more go: Im working on a textviewer/editor and have used autodetect url on it, and it has worked fine. But somewhere...
4
by: nkoier | last post by:
Hi, I've been going crazy trying to figure out what's wrong with our Asp.Net 2.0 intranet site. At the very top of our main page I provide a TextBox and a Button for submitting Google searches....
2
by: =?Utf-8?B?Vi5DaG9ja2FsaW5nYW0u?= | last post by:
IDE : VS .NET 2003, Platform : .NET 2.0, Hi All, I have my project in VS.Net 2003 (VB.Net). The OS is Vista Ultimate. In a form's Button_Click() event i call a dll which calls another dll and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.