Got an iPhone or iPad? We have a brand new Pastebin App for both devices, and it's totally free! Click here to download the new Pastebin App for iOS.
Guest

theo

By: a guest on Jan 28th, 2010  |  syntax: Perl  |  size: 0.28 KB  |  hits: 72  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. #! /usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5.  
  6. my %hash = (
  7.     'fermat' => ['dual core', '2G DDR'],
  8.     'gauss'  => ['P4', '1G'],
  9.     'euler'  => ['586', '64k']
  10. );
  11.  
  12. foreach ('descartes', 'gauss', 'laplace')
  13. {
  14.     print "we have a machine named $_\n" if ($_ ~~ keys %hash);
  15. }