in reply to Re: begin with perl
in thread begin with perl

when i test your code

use Modern::Perl; say 'listes associatives'; my %url = ( fd => "www.forumdz.com", ok => "www.ouedkniss.com", se => "www.sec4ever.com" );

i get this error with cygwin :

sad723@sad723-PC ~/perl $ ./hash.pl ./hash.pl: ./hash.pl: cannot execute binary file

and this error when i use cmd;

C:\Perl\bin>hash.pl Unrecognized character \xE3 at C:\Perl\bin\hash.pl line 2.

Replies are listed 'Best First'.
Re^3: begin with perl
by Not_a_Number (Prior) on Oct 30, 2011 at 13:27 UTC

    Unicode character \xE3 is 'Latin small letter a with tilde'.

    When I run your posted code, I don't get any error message. Are you sure there's no tilde on the 'a' in 'listes associatives' in your original?

      normally i'm sur no tild can't understand !!!!!!??,

        I'm not quite sure what you mean by 'normally', but try this: delete the line in your text editor, and re-type it by hand.

Re^3: begin with perl
by CountZero (Bishop) on Oct 31, 2011 at 07:04 UTC
    What Perl are you using?

    I have tried it on Strawberry Perl 5, version 12, subversion 1 (v5.12.1) and I have saved my script as ASCII, UTF-8, UTF-16 (both Big-endian and Little-endian), with and without a BOM (Byte Order Mark) and it all works without error.

    Perhaps there is something wrong with your set-up.

    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

      i use ActivePerl 5.8.3.809

      in cygwin i don't know the version

      ;

      i have three exemple of script perl;

      the two first scrip work good but the third on no

      confused !!!!!!!!!!!!!

        problem solved thank's every on

        encoding problem