If the charge is at 100% you are only picking up the last two zeros.
Simple would be:
#!/usr/bin/perl print 'Battery: ', ( `acpi` =~ /(\d+)%/ )[ 0 ] // '??';
In reply to Re: Laptop Battery Percentage
by jwkrahn
in thread Laptop Battery Percentage
by naildownx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |