perl -e' use v5.36; use utf8::all; use Bencode qw( bdecode ); use File::Slurper qw( read_binary ); binmode STDIN; sub process_torrent { say bdecode( $_[0] )->{info}{name}; } if ( @ARGV ) { process_torrent( read_binary( $_ ) ) for @ARGV; } else { process_torrent( do { local $/; } ); } ' #### perl -gne' use v5.36; use Bencode qw( bdecode ); binmode STDOUT, ":encoding( UTF-8 )"; binmode STDERR, ":encoding( UTF-8 )"; say bdecode( $_ )->{info}{name}; '