8. Perl Regular Expressions Pattern Matching Modifiers /g – match all occurrences /i– Do case-insensitive pattern matching /m – Treat string as multiple lines. /o – compile pattern only once /s - Treat string as single line Let . Match a new line /x –Use extended regular expressions Ignore most white space and permits comments in pattern Mostly used in the above is /g and /i only
9. Perl Files Open a file Open (DATA, “<numbers.dat”); Close a file Close DATA Print to a file Print DATA “Hello Welcome”; Here DATA is the file handle, < - indicates File Read > - indicates File Write and >> indicates file Append