|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
if i wanted to search through a string with the input of the user, how would i do that?
i.e. user input for search: a subjects: alberto randels zardoz printer the search would return alberto, randels, & zardoz all because they contain the letter a, but not printer because it doesn't. how would i do this? thanks alot ------------------ rrandels. |
|
#2
|
||||
|
||||
|
#!/usr/local/bin/perl
print "Enter somethingn"; chomp($input = <STDIN> ); if ($input =~ /a/){ print "has an 'a'"; } else{ print "no 'a' here"; } |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > searching through a string? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|