| 5 | | == Tickets == |
| | 14 | === Perl => Find Unmatched Brace (Brackets, Square Brackets & Braces) |
| | 15 | Initial observations, |
| | 16 | * works in current editor, does not require the file to be saved :) |
| | 17 | * highlights the last unmatched ;-( |
| | 18 | * I think it must be counting charter types, with little reference to Perl syntax ;-( |
| | 19 | ---- |
| | 20 | This file passes, this is rubbish ;-(( |
| | 21 | {{{#!perl |
| | 22 | #!/usr/bin/perl |
| | 23 | # based on 03_Good_Morning.pl |
| | 24 | # This file assumes that you already read (and understood) earlier sessions! |
| | 25 | |
| | 26 | use strict; # This will be discussed later |
| | 27 | use warnings; |
| | 28 | ### added [ |
| | 29 | my [( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = localtime( time() ); |
| | 30 | |
| | 31 | if ( $hour < 10 ) { print "Good morning!\n"; } |
| | 32 | |
| | 33 | elsif {( $hour == 12 ) { print "Out for lunch...\n"; }} ### added {} |
| | 34 | elsif ( $hour <= 18 ) { print "Hello world!\n"; }] ### added ] |
| | 35 | elsif (( $hour < 23 ) { print "Good night.\n"; }) ### added () |
| | 36 | |
| | 37 | else { print "sleep well!\n;" } |
| | 38 | }}} |
| | 39 | |
| | 40 | run against Padre {{{r14200}}} |
| | 41 | ---- |
| | 42 | == Tickets |