logo
Автор: ksurent
Описание:
Язык: Perl
chomp(my $input = <STDIN>);
my $kinda_secret = get_data($input);
if(defined $kinda_secret) {
  print 'Your secret is: ', $kinda_secret
}
else {
  print 'No soup for you'
}

sub get_data {
  my $input = shift;
  open my $fh, '<', 'data.file' or return;
  my $retval;
  while(<$fh>) {
    if(/^$input:(.+?)$/) {
      $retval = $1;
      last
    }
  }
  close $fh;

  $retval
}
Последние размещения:
blessmaster (PHP)
antonivanov (SQL)
antonivanov (PHP)
brinza (PHP)
ilyhamas (Delphi)
Riateche (PHP)
otherlight (Java)
otherlight (JavaScript)
otherlight (CSS)
otherlight (CSS)
biophreak (JavaScript)
n4n (Perl)
prostoHz (Java)
ndubinkin (XML)
Riateche (Plain Text)
Slapotam (Perl)
ksurent (Perl)
John_Wein (Java)
John_Wein (HTML)
Riateche (HTML)
netsago.paste.β © 2009 Neunica