Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Merge 2 lines in 1 die statement

by sgifford (Prior)
on Apr 28, 2007 at 05:51 UTC ( [id://612506]=note: print w/replies, xml ) Need Help??


in reply to Die statement with text & formatting of the user

You could create your own equivalent to die that would do the above. Something like:
sub mydie(@) { print h1(@_); exit(0); }

Then you can say:

$select->rows and mydie {class=>'cyan'}, "Error occured $row->{username}! Script h +ave to die";

Update: Fix typo above (Thanks fenLisesi!)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://612506]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-29 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found