#!/usr/bin/perl
use warnings;
use strict;
use charnames ':full';
my $n;
print "my number\n";
0.00000;
chomp($n=<STDIN>);
print "the value $n is",$n ? "true":"false","\n";
$n+=0;
print "the value of $n now:",$n ? "true":"false","\n";
my $name="shrikant";
my $value=substr($name,3,2);
print $value,"\n";
my $sent="this is what i had...!";
print $sent,"\n";
substr($sent,5,2)="is not";
print $sent,"\n";
sub cutoff
{
my (@positions)=@_;
my $template=' ';
my $lastpos=1;
foreach my $place (@positions) {
$template.="A".($place-$lastpos);
$lastpos=$place;
}
$template.="A*";
return $template;
}
my $fmt=cutoff(8,14,20,26,30);
print $fmt,"\n";
print "\N{GREEK CAPITAL LETTER DELTA} is called delta.\n";
my %seen=();
my $string="an apple a day";
foreach my $char (split //,$string) {
$seen{$char}++;
}
print "the unique charector are:",sort(keys %seen),"\n";