in reply to Re: Setting Conditional Variable Based on Partial Match
in thread Setting Conditional Variable Based on Partial Match

Thanks for the response. I actually do use strict and warnings, I just left them out of the code that I pasted here. I'll include everything in my program in the future. The backslash tells perl to recognize the character "as is" and not as a special character, correct?
  • Comment on Re^2: Setting Conditional Variable Based on Partial Match

Replies are listed 'Best First'.
Re^3: Setting Conditional Variable Based on Partial Match
by ccn (Vicar) on Dec 24, 2008 at 10:20 UTC
    > The backslash tells perl to recognize the character "as is" and not as a special character, correct?

    Yes with some exceptions:

        \t		tab             (HT, TAB)
        \n		newline         (NL)
        \r		return          (CR)
        \f		form feed       (FF)
        \b		backspace       (BS)
        \a		alarm (bell)    (BEL)
        \e		escape          (ESC)
        \033	octal char	(example: ESC)
        \x1b	hex char	(example: ESC)
        \x{263a}	wide hex char	(example: SMILEY)
        \c[		control char    (example: ESC)
        \N{name}	named Unicode character
    
    
        \l		lowercase next char
        \u		uppercase next char
        \L		lowercase till \E
        \U		uppercase till \E
        \E		end case modification
        \Q		quote non-word characters till \E
    

    see: perldoc perlop (Quote and Quote-like Operators)