function from shell input

Hi all

i have the command called printer which needs a usernmae for example i would run the commnad

printer <username>

how can i write i quick script in perl that if the username is ab then write "denined" and if it is anything else it will work

thanks

Adam

Can you try the code which you ve tried...