473,473 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to display program output on vista machine

1 New Member
Hi,

I am very new at PERL program as i am writing my first program.
Expand|Select|Wrap|Line Numbers
  1. #!/usr/local/bin/perl -w
  2. print "hello world!\n";
  3.  
but the output window is disapearing very quickly that i cant even really see anythin on the window. I dont even know that if this programming is really working. by the way, i am using windows vista.

anyone would u plz help me with that? i really aprreaciate that.

thank u
Mar 30 '10 #1
1 1449
numberwhun
3,509 Recognized Expert Moderator Specialist
First, the first line in the script is the "shebang" line. Specifically, I am referring to this line:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/local/bin/perl -w
  2.  
The -w in the line tells perl to turn on warnings. I personally don't use the switch, I just specify it without it. On another note about it, that line is specific to a Unix/Linux system. Since you are on Windows, you don't really even need that line, but its good practice to stay in. You could specify your c:\ path to the perl interpreter if you wish. When I develop on Windows (if ever), I don't put it at all.

When starting a perl script, your script should always start as follows, using a unix example:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/local/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5.  
You will find that a number of us on here will have you add those two lines after the shebang line and troubleshoot the issues it finds before we will look at your code.

The reason the window goes away so quickly is because the program exits that quickly. My recommendation is to run your scripts from the command line instead of double clicking on them. It will allow you to see all that is going on. Open the dos prompt, navigate to where the script is and run it as so:

Expand|Select|Wrap|Line Numbers
  1. perl script.pl
  2.  
You will notice that the script runs and outputs to the screen and goes back to a prompt.

Hope that helped.

Regards,

Jeff
Mar 30 '10 #2

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

Similar topics

8
by: G Patel | last post by:
I wrote the following program to remove C89 type comments from stdin and send it to stdout (as per exercise in K&R2) and it works but I was hoping more experienced programmer would critique the...
9
by: salad | last post by:
Due to an earlier posting I read in this newsgroup regarding Office 2007 beta, I downloaded it. After I DL'd it, I got an invitation from MS to get WinVista. I am now wondering if, since both...
13
by: Mark Rae | last post by:
Hi, On Friday I attended the Microsoft EVO conference in London where they talked about Vista, Office 2007 and Exchange 2007 and how they all work together beautifully, how they were all...
56
by: Squishy | last post by:
I tried installing my VS2005 Pro on Vista Ultimate 32 bit RTM today and got errors stating that VS2005 was not compatible with Vista. Microsoft......please pull your finger out of my ass and tell...
18
by: =?Utf-8?B?Tm9ybUQ=?= | last post by:
I have created a three tier application consisting of Client (Exe and Exe.Config), Middle (WebServices) and Database tiers. The Client tier contains an Exe, an Exe.Config and a dynamic Web...
1
by: pavanG | last post by:
The following is the setup I have at home. The problem is I cannot ping Vista machine(192.168.2.5) from XP machine(192.168.2.2) So accessing it from Internet is Out of question My aim is to...
7
by: buzzluck68 | last post by:
Hello, I have an in house application that we developed, but everyone who needs to use the program are not allowed to be local admins on their PCs. I was wondering if there was a way to code...
7
by: Gene45 | last post by:
I posted this question earlier and it seemed to explode and disappear, so I am trying again. I apologize if it ended up as a duplicate.. I set up a home network by adding a Vista Laptop to a...
3
by: kellin | last post by:
So, Ive got this one business client that's got about 10 Windows XP machines on a network, and added a Windows Vista machine to the mix. The network is a mix of wireless and wired computers on a...
10
by: nik | last post by:
Hi, I've compiled my application on my vista machine, and it won't run at all on my xp machine. In the windows error report I get Exception code; 0xe0434f4d. I searched for that exception, but...
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
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...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.