in reply to Grave accent/Backtick/`` caveats

They are equal for me. Maybe you're picking up a different echo (one that ignores the -n arg)? What's the following give you?

#!/usr/bin/perl use Data::Dumper; $text = "deepak.gulati"; $hash1 = `echo -n $text` print Dumper( $hash1 );
Are you seeing the newline in the dumper? What has the hash given by both?

-derby

Replies are listed 'Best First'.
Re^2: Grave accent caveats
by massa (Hermit) on Jan 19, 2009 at 17:23 UTC
    I think it's really probable that his echo does not have -n and the backquotes are giving him the hash for "-n deepak.gulati\n"
    []s, HTH, Massa (κς,πμ,πλ)

      And Massa hit the nail on the head:

      my $text= "-n deepak.gulati\n"; my $hash2 = Digest::SHA1::sha1_hex($text); print "$hash2\n"; Output: 98bed27374f41bdef95f4dbc6cb3ff3728721837
Re^2: Grave accent caveats
by deepakg (Novice) on Jan 19, 2009 at 17:30 UTC
    Thanks derby,

    Here is my output (on the Mac machine)

    $VAR1 = 'deepak.gulati';