user2702225
user2702225

Reputation: 37

write function for file handling in perl

I am trying to use write function of perl for formatting the output written in a file.but I am not able to do so as it gives me error :use of comma-less variable list is deprecated in line 3.

format STDOUT=
@<<<<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<
  $text            $text1
.
$text="hello";
$text1="world!";
write;

Upvotes: 0

Views: 124

Answers (1)

alexsh
alexsh

Reputation: 1141

Just replace it with

format STDOUT=
@<<<<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<
  ($text, $text1)
.
$text="hello";
$text1="world!";
write;

Upvotes: 1

Related Questions