print SMBCLIENT "Hi there/n"; #### open (MESSAGE, "/print_quota/windows/quota_message"); while (){ s/USER-LOGIN/$login/; s/PAGES-PRINTED/$pages/; if($pagestate eq "duplex"){ s/PAGESTATE/double sided/; } elsif ($pagestate eq "simplex"){ s/PAGESTATE/single sided/; } s/PRINTER/$printer/; s/QUOTA-USED/$quota/; s/POST-QUOTA/$report[2]/; s/ORIGINAL-QUOTA/$report[1]/; s/PRINTER/$printer/; s/MULTIPLIER/$multiplier/; open (SMBCLIENT, "|/usr/bin/smbclient -U Print_Quota -M $report[0] -I $hostip[0]"); print SMBCLIENT "$_"; close SMBCLIENT; } close MESSAGE; #### This is a test. Print quotas have yet to be fully implemented!\n\nYou, USER-LOGIN, have printed PAGES-PRINTED page(s) PAGESTATE on the printer \"PRINTER\".\n\nYou used QUOTA-USED credits on this print job, and you currently have POST-QUOTA quota credits left of your original ORIGINAL-QUOTA.\nThe printer \"PRINTER\" is worth MULTIPLIER quota credit(s).