- or download this
>>>cat temp.txt
my dog is (red1)
my cat is (blue1)
...
my cat is (blue5)
my dog is (red6)
my cat is (blue6)
- or download this
#!/usr/bin/perl
$mystring = join("", <>);
...
print $mystring;
print "-----------------------------------------\n";
}
- or download this
>>>>cat temp.txt | perl temp.pl
-----------mystring--------------------------
my dog is (red1)
...
my dog is (red6)
my cat is (blue6)
-----------------------------------------