use warnings; use strict; 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 open my $fh, '<', \$s or die $!; while ( my $line = <$fh> ) { chomp($line); print "<$line>\n"; } close $fh;