LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to search for a character? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-search-for-a-character-122160/)

mimf 12-02-2003 11:06 PM

How to search for a character?
 
I have created a perl script that will open a file for reading, but how can i make it search for a specific character, if that character is given at the prompt? e.g. i want to search for number 33 in a list inside a file. Any help would be greatly appreciated.

tiger3 12-03-2003 06:20 AM

using variables and the m// operator you could do this
if($File =~ m/$Find)


All times are GMT -5. The time now is 04:57 PM.