"graph" Character Class.
What is [[:graph:]] Character Class?
The [[:graph:]] is same as [[:print:]], but matches non-blank characters like alphabets, special characters, numbers but excludes spaces, control characters etc.
$str = "LIIÏÏ ïï";
$pat = ereg_replace("[[:graph:]]","G",$str);
In the above example the character class "[[:graph:]]", is used in the "ereg_replace", and all non-blank character ie., "L","I" are replaced with the string "G". The control characters and spaces alone are left without replacing it with "G".
print "content-type: text/htmlnn";
$str = "344adsds.";
if ( $str =~ '[[:graph:]]$')
In the above example, using the [[:graph:]] character class the end of the string is checked using "$", to check for any non-blank characters, so it matches.