Name
WriteAttr
Synopsis
$cons
->WriteAttr(attrs
,col
,row
)
Writes the attributes contained in the string
attrs
, beginning at
col
, row
,
without affecting the characters that are on screen. The string
attrs
can be the result of a ReadAttr
function, or you can build
your own attribute string; in this case, keep in mind that every
attribute is treated as a character, not a number (see example).
Returns the number of attributes written, or undef
on error.
$CONSOLE->WriteAttr($attrs, 0, 0); # note the use of chr( )... $attrs = chr($FG_BLACK | $BG_WHITE) x 80; $CONSOLE->WriteAttr($attrs, 0, 0);
Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.