Because nobody knows what $" is
Anyone who doesn't know what $" is, almost certainly won't understand @array[2,4], so you better make that:
my $output = join '', $array[2], $array[4];
But then, even if they know about the function join(), they probably won't understand the statement join, so you'd better make that:
my $output = join( '', $array[2], $array[4] );
Then, of course, for consistency you should make that last line:
print( "$output\n" );
But WFT!? Variable names inside quoted strings? That can't be right:
print( $output . "\n" );
But what the hell is that dot doing there!?
print( join( '', $output, "\n" ) );
But hang on a minute! Nested function calls!? We can sort that abomination out:
my $output2 = join( '', $output, "\n" ); print( $output2 );
my @array = ( 'abc', 'def', 'ghi', 'jkl', 'mno', 'pqr', 'stu', 'vwx', 'yz ' ); my $output = join( '', $array[2], $array[4] ); my $output2 = join( '', $output, "\n" ); print( $output2 );
But, but, but, where are the classes and objects and methods and, and and ... Sod this! I'm going back to a proper language like JavaPy++ Cscript 3000 where fings are dun proply!
In reply to Re^2: What am I not understanding about $,
by BrowserUk
in thread What am I not understanding about $,
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |