in reply to Re^3: Sorting Issue
in thread Sorting Issue

Nothing works but thanks...

Replies are listed 'Best First'.
Re^5: Sorting Issue
by polettix (Vicar) on Jul 26, 2005 at 16:59 UTC
    You're the welcome, but you could post some more code and a real-world example of what ends up inside $status. I think that many of us got fooled into thinking that $status might contain the whole value "P|F|C|D|I|A|N|R|S|X", pipe characters included. Please post an example of an actual value and how you get it from the database.

    Moreover, you're maybe doing some iteration over the results from the database. If so, please post the loop as well. As a rule of thumb, post anything that may help us understanding where you come from, how you munge your data and where you want to go. Cutting out all that's not necessary to the goal :)

    Flavio
    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.
      Hi, There isn't nothing more to it, the variable $status get a letter value that can be one of the letter on the code and the regular expression just do the substitution based on the value of the letter found: like if $status equal letter P|F|C|D|I it should print "Posted" and if $status equal letter A it should print (Display) "Accepted" and so on like on the code I submitted.