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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange behaviour in substitution 2

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
I am using this substitution to clean some inputted data.
I have used the same code numerous times before without problems.

Code:
$FieldValue = "Charlie----";
print "FVB - $FieldValue<br>";
$FieldValue = ~s/[^a-zA-Z0-9 \@\.]//gi;
print "FVA - $FieldValue<br><br>";

Gives output of:-

Code:
FVB - Charlie----
FVA - 18446744073709551615

Why is it substituting the string for a number?


Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top