- or download this
my $filename = shift @_;
...
my $first = shift;
my $second = shift;
my $third = shift;
- or download this
public static void do_something(String str) {
System.out.println("got " + str);
...
public static int do_something() {
return 42;
}
- or download this
sub do_it {
my ($str,$numb) = @_;
...
do_it('Hello World');
do_it('lucky number',7);
print "the answer is ", do_it(), "\n";
- or download this
def ask_ok(prompt, retries=4, complaint='Yes or no, please!'):
while 1:
...
quit = 0
while not quit:
quit = ask_ok(prompt = 'Do you really want to quit?')
- or download this
use strict;
...
while (not $quit) {
$quit = ask_ok({prompt => 'Do you really want to quit?'});
}
- or download this
use strict;
use base qw(Attribute::Default);
...
while (not $quit) {
$quit = ask_ok(prompt => 'Do you really want to quit?');
}