If you
really wrote $tcp_obj->{falgs}, an error is normal, because you should write $tcp_obj->{flags}.
The value you intend to print is as in the packet, in binary form, so you must use binary operators to scan each flag. The example given in the documentation reads :
# set the syn flag
$tcp_obj->{flags} |= SYN;
NetPacket::TCP exports the different flags, so you can use them as above.
You should consider reading about binary operators.
Hope this helps.
Gu