Sed and Print in Perl

February 15, 2010

I recently needed a sed-like script for a web based perl app doing to internally convert request ports and came across some interesting print code in the process of testing it

#!/usr/bin/perl

sub println
{
$\ = "\n";
@_ = ($_) unless @_;
print @_;
}

 

my $sec = "https://dmom.domain.com:633/confirm/me/";
$sec =~ s/:633/:81/;
println $sec;


Follow

Get every new post delivered to your Inbox.