#!/usr/bin/perl use strict; use warnings; use feature 'say'; my $s = <<'EOF'; int t; //variable t t->a=0; //t->a does;; something printf("\nEnter the Employee ID : "); scanf("%d", ptrx->eid); //employee id ptrx->eid printf("\nEnter the Employee Name : "); scanf("%s", ptr->name); return 0; EOF for my $line (split/(?m)\n(?=$)/, $s) { say '<' . $line . '>'; }