start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: Write Chapter 19
Win32 Modules and Extensions
Next: Reference: WriteChar
 

WriteAttr

$

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);


Previous: Reference: Write Perl in a Nutshell Next: Reference: WriteChar
Reference: Write Book Index Reference: WriteChar