Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there any data type validation in perl?

Status
Not open for further replies.

ejaj

Programmer
Sep 26, 2002
7
0
0
DE
Hi

Is there any data type validation in perl?. I mean, like in C, I can define any perticular variable to to a certain type .eg. integer,char, real . Is there anyting such in Perl. I have a program where i like to check the user input before further processing. Almost like Data validation. Can any one tell me about it?

Thanks..
Ejaj
 
You really need to read up on Perl - start by doing

perldoc perl

at a command prompt.

The way data validation is done in Perl is normally by using regular expressions - read about Perl regular expressions by doing

perldoc requick

and/or

perldoc perlretut

HTH. Hardy Merrill
 
I would also advise you consider reading any of the O'Reilly books on Perl (Learning Perl is my current favourite; check out or maybe Perl for Dummies (by Paul Hoffman).

Those books usually help me out when i'm stuck, especially with some of Perls more...interesting features like regular expressions and assosciative arrays etc etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top