Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

How to handle Special characters and foreign characters in perl

by kaarthikeyaan (Initiate)
on Apr 04, 2012 at 13:19 UTC ( [id://963448]=perlquestion: print w/replies, xml ) Need Help??

kaarthikeyaan has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

if ($p4have !~ /$local/) { print "$local - Extra File\n"; $extra++; }

When $p4have contains value like "C:\Documents and Settings\All Users\Favorites" (i.e. without anyspecial character or german characters) it is working absolutely fine but if the $p4have contains any special chars or foreign chars (e.g. D:\docs\für_den_Integrator.pdf) it is always false.

Can someone help me to get rid of this problem.

Thanks in advance

Regards

Karthikeyaan A. R.

Replies are listed 'Best First'.
Re: How to handle Special characters and foreign characters in perl
by moritz (Cardinal) on Apr 04, 2012 at 13:21 UTC

      Thank you...

Re: How to handle Special characters and foreign characters in perl
by CountZero (Bishop) on Apr 04, 2012 at 17:28 UTC
    You will get better and more helpful answers when you show a (small) script that exhibits this behaviour.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://963448]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-20 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found