in reply to Re^4: Perl VS Python
in thread Perl VS Python
No, not like perl, it relies on % and dictionaries (hash).
Ex
In perl that might be you might writeprint "Hello %(name)s! Today is %(day)s!" % ( 'name' : 1, 'day' : 2 );
use Text::Sprintf::Named; my $formatter = Text::Sprintf::Named->new( {fmt => "Hello %(name)s! Today is %(day)s!"} ); $formatter->format({args => {'name' => "John", 'day' => "Thursday"}});
In Section
Seekers of Perl Wisdom