?
Solved

error with www

Posted on 2005-02-24
13
Medium Priority
?
161 Views
Last Modified: 2010-03-05
use strict;
#use lib '/u/rshah1/toolswww/lib/site_perl/5.6.1/';
use lib '/u/rshah1/CPAN/mechanize/site_perl/5.6.1/';
use lib '/u/rshah1/CPAN/CPAN/5.6.1/';
use lib '/u/rshah1/CPAN/tagset/5.6.1/';
use lib '/u/rshah1/CPAN/Test/';
use lib '/u/rshah1/CPAN/parser/lib/';
use HTTP::Cookies;
use HTTP::Response;
use HTTP::Request::Common;
use LWP::UserAgent;
use Sys::Hostname;
use Time::Local;
use Crypt::SSLeay;
use WWW::Mechanize;
use HTML::TokeParser;
use Net::FTP;
#use Test::More qw(no_plan);;


my $mech = WWW::Mechanize->new();
$mech->agent_alias( 'Windows IE 6' );
#my $url = 'https://merchantaccount.quickbooks.com/j/mas/sasignup';
my $url = 'https://merchantaccount.quickbooks.com/j/mas/possignup';
$mech->get( $url );
print $mech->content();


when i run i get error:
500 /\x{FEFF}/: Can't use \x{} without 'use utf8' declaration

what does it mean??????

also i have all the necessary modules installed
0
Comment
Question by:shahrahulb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 3
13 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 13399038
it means you have an old version of Perl that does not natively handle utf8
see
perldoc utf8
0
 
LVL 1

Author Comment

by:shahrahulb
ID: 13402778
what shouldi do then
0
 
LVL 1

Author Comment

by:shahrahulb
ID: 13404383
i checked the version, it is v5.6.0 built for sun4-solaris.  if i comment the line  print $mech->content();
the script does not give any error. but the $mech->content()  is very important in my script as i have to check the content

For your information,
when i run the above code on different server with "v5.6.1 built for sun4-solaris" it works fine

is it because of the version or something different????

what i should i do

Rahul
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 84

Expert Comment

by:ozo
ID: 13407997
If you can't upgrade your Perl version, you might try
print $mech->{content};
0
 
LVL 84

Expert Comment

by:ozo
ID: 13408072
Or try adding

use utf8;


0
 
LVL 1

Author Comment

by:shahrahulb
ID: 13412015
use utf8;  does not works
0
 
LVL 1

Author Comment

by:shahrahulb
ID: 13412844
what is the difference between print $mech->{content};  and print $mech->content()

i'll try that on monday once i reach office.

Rahul
0
 
LVL 1

Author Comment

by:shahrahulb
ID: 13414052
can i try $mech->response()  or   $mech->res()
0
 
LVL 1

Author Comment

by:shahrahulb
ID: 13414112
use utf8; didn't work
i tried $mech->title()    didn't throw any error but didn't display the title of the page too.

0
 
LVL 1

Author Comment

by:shahrahulb
ID: 13419843
i tried use utf8; and $mech->{content}
not working

still getting error:
500 /\x{FEFF}/: Can't use \x{} without 'use utf8' declaration
0
 
LVL 1

Author Comment

by:shahrahulb
ID: 13421535
is there any solution to my problem without upgrading the perl version
0
 

Accepted Solution

by:
PAQ_Man earned 0 total points
ID: 13658830
PAQed with points refunded (500)

PAQ_Man
Community Support Moderator
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question