shahrahulb
asked on
error with www
use strict;
#use lib '/u/rshah1/toolswww/lib/si te_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
#use lib '/u/rshah1/toolswww/lib/si
use lib '/u/rshah1/CPAN/mechanize/
use lib '/u/rshah1/CPAN/CPAN/5.6.1
use lib '/u/rshah1/CPAN/tagset/5.6
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
ASKER
what shouldi do then
ASKER
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
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
If you can't upgrade your Perl version, you might try
print $mech->{content};
print $mech->{content};
Or try adding
use utf8;
use utf8;
ASKER
use utf8; does not works
ASKER
what is the difference between print $mech->{content}; and print $mech->content()
i'll try that on monday once i reach office.
Rahul
i'll try that on monday once i reach office.
Rahul
ASKER
can i try $mech->response() or $mech->res()
ASKER
use utf8; didn't work
i tried $mech->title() didn't throw any error but didn't display the title of the page too.
i tried $mech->title() didn't throw any error but didn't display the title of the page too.
ASKER
i tried use utf8; and $mech->{content}
not working
still getting error:
500 /\x{FEFF}/: Can't use \x{} without 'use utf8' declaration
not working
still getting error:
500 /\x{FEFF}/: Can't use \x{} without 'use utf8' declaration
ASKER
is there any solution to my problem without upgrading the perl version
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
see
perldoc utf8