<Keyword>#!/usr/bin/perl -w</Keyword><br/>
<Comment># This is a pseudo Perl file to test Kate's Perl syntax highlighting.</Comment><br/>
<Comment># </Comment><Alert Level 2>TODO</Alert Level 2><Comment>: this is incomplete, add more syntax examples!</Comment><br/>
<Normal Text></Normal Text><br/>
<Keyword>sub </Keyword><Function>prg</Function><Normal Text>(</Normal Text><Data Type>$</Data Type><Normal Text>)</Normal Text><br/>
<Normal Text>{</Normal Text><br/>
<Normal Text>	</Normal Text><Keyword>my</Keyword><Normal Text> </Normal Text><Data Type>$var</Data Type><Normal Text> = </Normal Text><Function>shift</Function><Normal Text>;</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	</Normal Text><Data Type>$var</Data Type><Normal Text> =~ </Normal Text><Operator>s/</Operator><Pattern>bla</Pattern><Operator>/</Operator><String (interpolated)>foo</String (interpolated)><Operator>/igs</Operator><Normal Text>;</Normal Text><br/>
<Normal Text>	</Normal Text><Data Type>$var</Data Type><Normal Text> =~ </Normal Text><Operator>s!</Operator><Pattern>bla</Pattern><Operator>!</Operator><String (interpolated)>foo</String (interpolated)><Operator>!igs</Operator><Normal Text>;</Normal Text><br/>
<Normal Text>	</Normal Text><Data Type>$var</Data Type><Normal Text> =~ </Normal Text><Operator>s#</Operator><Pattern>bla</Pattern><Operator>#</Operator><String (interpolated)>foo</String (interpolated)><Operator>#igs</Operator><Normal Text>;</Normal Text><br/>
<Normal Text>	</Normal Text><Data Type>$var</Data Type><Normal Text> =~ </Normal Text><Operator>tr</Operator><Pattern>/a-z/A-Z/</Pattern><Normal Text>;</Normal Text><br/>
<Normal Text>	(</Normal Text><Data Type>$match</Data Type><Normal Text>) = (</Normal Text><Data Type>$var</Data Type><Normal Text> =~ </Normal Text><Operator>m/</Operator><Pattern Internal Operator>(</Pattern Internal Operator><Pattern>.</Pattern><Pattern Internal Operator>*?)</Pattern Internal Operator><Operator>/igs</Operator><Normal Text>);</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	</Normal Text><Data Type>$test</Data Type><Normal Text> = </Normal Text><Decimal>2</Decimal><Normal Text>/</Normal Text><Float>453453.21</Float><Normal Text>;</Normal Text><br/>
<Normal Text>	</Normal Text><Data Type>$test</Data Type><Normal Text> /= </Normal Text><Decimal>2</Decimal><Normal Text>;</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	</Normal Text><Function>print</Function><Normal Text> </Normal Text><Operator>qq~</Operator><String (interpolated)>d fsd fsdf sdfl sd</String (interpolated)><Operator>~</Operator><br/>
<Normal Text>	</Normal Text><br/>
<Normal Text>	</Normal Text><Special Variable>$"</Special Variable><Normal Text> = </Normal Text><Operator>'</Operator><String>/</String><Operator>'</Operator><Normal Text>;</Normal Text><br/>
<Normal Text>	</Normal Text><br/>
<Normal Text>	</Normal Text><Data Type>$foo</Data Type><Normal Text> = </Normal Text><Operator><<</Operator><Keyword>__EOF;</Keyword><br/>
<String (interpolated)>d ahfdklf klsdfl sdf sd</String (interpolated)><br/>
<String (interpolated)>fsd sdf sdfsdlkf sd</String (interpolated)><br/>
<Keyword>__EOF</Keyword><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	</Normal Text><Data Type>$x</Data Type><Normal Text> = </Normal Text><Operator>"</Operator><String (interpolated)>dasds</String (interpolated)><Operator>"</Operator><Normal Text>;</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	</Normal Text><Keyword>next</Keyword><Normal Text> </Normal Text><Keyword>if</Keyword><Normal Text>( </Normal Text><Data Type>$match</Data Type><Normal Text> </Normal Text><Operator>eq</Operator><Normal Text> </Normal Text><Operator>"</Operator><String (interpolated)>two</String (interpolated)><Operator>"</Operator><Normal Text> );</Normal Text><br/>
<Normal Text>	</Normal Text><Keyword>next</Keyword><Normal Text> </Normal Text><Keyword>if</Keyword><Normal Text>( </Normal Text><Data Type>$match</Data Type><Normal Text> =~ </Normal Text><Operator>/</Operator><Pattern>go</Pattern><Operator>/i</Operator><Normal Text> );</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	</Normal Text><Data Type>@array</Data Type><Normal Text> = (</Normal Text><Decimal>1</Decimal><Normal Text>,</Normal Text><Decimal>2</Decimal><Normal Text>,</Normal Text><Decimal>3</Decimal><Normal Text>);		</Normal Text><Comment># a comment</Comment><br/>
<Normal Text>	</Normal Text><Data Type>@array</Data Type><Normal Text> = </Normal Text><Operator>qw(</Operator><Normal Text>apple foo bar</Normal Text><Operator>)</Operator><Normal Text>;</Normal Text><br/>
<Normal Text>	</Normal Text><Function>push</Function><Normal Text>(</Normal Text><Data Type>@array</Data Type><Normal Text>, </Normal Text><Decimal>4</Decimal><Normal Text>);</Normal Text><br/>
<Normal Text>	</Normal Text><Data Type>%hash</Data Type><Normal Text> = (red => </Normal Text><Operator>'</Operator><String>rot</String><Operator>'</Operator><Normal Text>,</Normal Text><br/>
<Normal Text>		blue => </Normal Text><Operator>'</Operator><String>blau</String><Operator>'</Operator><Normal Text>);</Normal Text><br/>
<Normal Text>	</Normal Text><Function>print</Function><Normal Text> </Normal Text><Function>keys</Function><Normal Text>(</Normal Text><Data Type>%hash</Data Type><Normal Text>);</Normal Text><br/>
<Normal Text>}</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Keyword>sub </Keyword><Function>blah</Function><Normal Text> {</Normal Text><br/>
<Normal Text>    </Normal Text><Keyword>my</Keyword><Normal Text> </Normal Text><Data Type>$str</Data Type><Normal Text> = </Normal Text><Operator><<</Operator><Keyword> '    EOS';</Keyword><br/>
<Normal Text>        this is my string</Normal Text><br/>
<Normal Text>        and it's continuation</Normal Text><br/>
<Keyword>    EOS</Keyword><br/>
<Normal Text></Normal Text><br/>
<Normal Text>    </Normal Text><Data Type>$str</Data Type><Normal Text> = </Normal Text><Operator>"</Operator><String (interpolated)>hello world</String (interpolated)><Operator>"</Operator><Normal Text>;</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>    </Normal Text><Data Type>$str</Data Type><Normal Text> = </Normal Text><Operator><<</Operator><Keyword> "    EOS";</Keyword><br/>
<String (interpolated)>        this is my string</String (interpolated)><br/>
<String (interpolated)>        and it's continuation</String (interpolated)><br/>
<Keyword>    EOS</Keyword><br/>
<Normal Text>}</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>&blah;</Normal Text><br/>
<Normal Text>prg(</Normal Text><Operator>"</Operator><String (interpolated)>test</String (interpolated)><Operator>"</Operator><Normal Text>);</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># Bracket closures in RegExp patterns (bug #364866)</Comment><br/>
<Operator>qr{</Operator><Pattern> </Pattern><Pattern Internal Operator>$</Pattern Internal Operator><Pattern>{var} aa{aa{a}a} aa</Pattern><Pattern Internal Operator>*</Pattern Internal Operator><Pattern>b</Pattern><Pattern Internal Operator>?</Pattern Internal Operator><Operator>}</Operator><Normal Text>;</Normal Text><br/>
<Operator>qr(</Operator><Pattern>aa</Pattern><Pattern Internal Operator>(</Pattern Internal Operator><Pattern>a</Pattern><Pattern Internal Operator>(</Pattern Internal Operator><Pattern>a</Pattern><Pattern Internal Operator>(</Pattern Internal Operator><Pattern>a</Pattern><Pattern Internal Operator>(</Pattern Internal Operator><Pattern>b</Pattern><Pattern Internal Operator>|</Pattern Internal Operator><Pattern>c</Pattern><Pattern Internal Operator>)</Pattern Internal Operator><Pattern>a</Pattern><Pattern Internal Operator>)</Pattern Internal Operator><Pattern>a</Pattern><Pattern Internal Operator>)</Pattern Internal Operator><Pattern>a</Pattern><Pattern Internal Operator>)</Pattern Internal Operator><Pattern>aa</Pattern><Pattern Internal Operator>*</Pattern Internal Operator><Pattern>b</Pattern><Pattern Internal Operator>?</Pattern Internal Operator><Operator>)</Operator><Normal Text>;</Normal Text><br/>
<Operator>s{</Operator><Pattern>aaa {aaa} a </Pattern><Special Variable>\x{A2}</Special Variable><Pattern> </Pattern><Pattern Internal Operator>*</Pattern Internal Operator><Pattern>b</Pattern><Pattern Internal Operator>?</Pattern Internal Operator><Operator>}{</Operator><String (interpolated)>aa</String (interpolated)><Operator>}</Operator><Normal Text>;</Normal Text><br/>
<Operator>s(</Operator><Pattern>aa</Pattern><Pattern Internal Operator>(</Pattern Internal Operator><Pattern>a</Pattern><Pattern Internal Operator>(</Pattern Internal Operator><Pattern>a</Pattern><Pattern Internal Operator>(</Pattern Internal Operator><Pattern>a</Pattern><Pattern Internal Operator>(</Pattern Internal Operator><Pattern>b</Pattern><Pattern Internal Operator>|</Pattern Internal Operator><Pattern>c</Pattern><Pattern Internal Operator>)</Pattern Internal Operator><Pattern>a</Pattern><Pattern Internal Operator>)</Pattern Internal Operator><Pattern>a</Pattern><Pattern Internal Operator>)</Pattern Internal Operator><Pattern>a</Pattern><Pattern Internal Operator>)</Pattern Internal Operator><Pattern>aa</Pattern><Operator>)(</Operator><String (interpolated)>aa</String (interpolated)><Operator>)</Operator><Normal Text>;</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># Strings as scalar references (bug #348765)</Comment><br/>
<Data Type>$x</Data Type><Normal Text> = \</Normal Text><Operator>'</Operator><String>Reference of a String</String><Operator>'</Operator><Normal Text>;</Normal Text><br/>
<Data Type>$y</Data Type><Normal Text> = \</Normal Text><Operator>"</Operator><String (interpolated)>Reference of a String</String (interpolated)><Operator>"</Operator><Normal Text>;</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># Variables that start with underscore (bug #355300)</Comment><br/>
<Data Type>$_variable</Data Type><br/>
<Special Variable>$_</Special Variable><Normal Text> </Normal Text><Comment># Reserved var.</Comment><br/>
<Normal Text></Normal Text><br/>
<Keyword>for</Keyword><Normal Text> </Normal Text><Keyword>my</Keyword><Normal Text> </Normal Text><Data Type>$x</Data Type><Normal Text> (</Normal Text><Data Type>$hash</Data Type><Normal Text>->{arr}-></Normal Text><Data Type>@</Data Type><Operator>*</Operator><Normal Text>) {</Normal Text><br/>
<Normal Text>    </Normal Text><Keyword>for</Keyword><Normal Text> </Normal Text><Keyword>my</Keyword><Normal Text> </Normal Text><Data Type>$k</Data Type><Normal Text> (</Normal Text><Function>keys</Function><Normal Text> </Normal Text><Data Type>$k</Data Type><Normal Text>->%</Normal Text><Operator>*</Operator><Normal Text>) {</Normal Text><br/>
<Normal Text>        ...</Normal Text><br/>
<Normal Text>    }</Normal Text><br/>
<Normal Text>}</Normal Text><br/>
