in reply to Argument isn't numeric in numeric ge

What makes you think that ^G1195874 should be seen as a number?

Replies are listed 'Best First'.
Re^2: Argument isn't numeric in numeric ge
by sumeetgrover (Monk) on Dec 09, 2011 at 14:29 UTC

    Exactly! ^G1195874 is certainly not a number. Perl is loosely typed but it doesn't mean it should be used in strange ways, like expecting alpha-numeric characters to be treated like numbers.

    You might like to re-consider the two (rather) 'strings' you're trying to compare!

Re^2: Argument isn't numeric in numeric ge
by natxo (Scribe) on Dec 09, 2011 at 14:23 UTC
    I understand your point, but when I print it with [] around the variables, it prints without the leading ^G:
    print "[$version_on_disk]\t version on disk\n"; print "[$version_dns]\t version dns\n";
    gives me:
    [1195874] version on disk [1195874] version dns
    So how does that ^G get in front of my variable :?

      The other thing to realize is that a control-G is probably not a printable character. After all, it's supposed to ring a bell (on a teletype) or make some kind of beep noise (on a terminal).

      Try piping your output through od.