Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

While drifting around the Monastery I read some mention of the Config module. Since I had not looked at it before I decided to check it out. To cut to the chase I found a sample program in the module and decided to run it. I copied it to gedit, saved it and ran it as follows:

perl -c configure.pl (My name for the program, of course.)

I got the following response:

Unrecognized character \xE2 at configure.pl line 12.

Of course I looked at the program again and saw no srange characters. I have left out the shebang line and a comment line at the top of the program. Here is the program:

use Config; use strict; my %sig_num; my @sig_name; unless($Config{sig_name} && $Config{sig_num}) { die "No sigs?"; } else { my @names = split \’ \’, $Config{sig_name}; @sig_num{@names} = split \’ \’, $Config{sig_num}; foreach (@names) { $sig_name[$sig_num{$_}] \|\|= $_; } } + print "signal #17 = $sig_name[17]\n"; if ($sig_num{ALRM}) { print "SIGALRM is $sig_num{ALRM}\n"; }

Sorry, this software program seems unable to print single quotes and pipes properly. My question then, is how do I locate this mysterious character? I realize that I could probably just delete the line and re-type it, but I would rather fix the problem. Besides, next time it might be something serious.

Thanks,

xenchu

Update: Thanks pg, let me give that a try...whoa! that compiles! That's great! How did you find out what the strange characters were? I am using 5.8.0 btw.

Update2:Thanks, ysth. Another valuable lesson learned.


The Needs of the World and my Talents run parallel to infinity.


In reply to Hex Error Code by xenchu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-03-29 05:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found