Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am new to this forum and am trying to use use strict

Status
Not open for further replies.

cxw

Programmer
Joined
Aug 17, 2007
Messages
20
Location
US
I am new to this forum and am trying to use use
use strict;
use diagnostics;

but my pl page will not display.
We run Windows 2003 server with perl installed on it.

This works:

#!/usr/bin/perl -w
use URI::Escape;
use LWP::UserAgent;
use XML::Simple;
use Data::Dumper;
use Net::SMTP;

This gives the error:
"Script failed to send data."

#!/usr/bin/perl -w
use strict;
use diagnostics;
use URI::Escape;
use LWP::UserAgent;
use XML::Simple;
use Data::Dumper;
use Net::SMTP;

What do I need to do to get the use strict; and use diagnostics; to work?
Thank you,
Chip
 
You just add them in like you did. They are only going to tell about problems with your perl code and not about connectivity problems.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those Who Say It Cannot Be Done Are Usually Interrupted by Someone Else Doing It; Give the wrong symptoms, get the wrong solutions;
 
don't do this:

Code:
#!/usr/bin/perl -w

do this instead:

Code:
#!/usr/bin/perl
use warnings;



Obviously there must be much more code in your program than the loading of modules and pragmas. The error message you are getting is associated with the rest of the code, not what you posted.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
OK that works
Thanks
Chip
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top