in reply to Ordering of print statements
Oh, I suppose that this code:#!/usr/bin/perl use strict; use warnings; $|=1; # generated from the if regex statements instead of printing # right away my %values = ( 'Luma Mode' => 'D45_PRED', 'Chroma Mode' => 'UV_CFL_PRED', 'CFL' => 5, 'Luma Angle' => 3, 'Chroma Angle' => 0, ); my @order = ('Luma Mode', 'Luma Angle', 'Chroma Mode', 'CFL', 'Chroma Angle'); foreach my $key (@order) { print "$key:\t $values{$key}\n"; } __END__ Luma Mode: D45_PRED Luma Angle: 3 Chroma Mode: UV_CFL_PRED CFL: 5 Chroma Angle: 0
Should be this??:if ($line =~ /\s*APP>\sIntraAngleDelta\s:\s(\d+)\s(\d+)/i) { print "Luma Angle : $1\n" } if ($line =~ /\s*APP>\sIntraAngleDelta\s:\s(\d+)\s(\d+)/i) { print "Chroma Angle : $2\n" }
if ($line =~ /\s*APP>\sIntraAngleDelta\s:\s(\d+)\s(\d+)/i) { $values{'Luma Angle'} = $1; $values{'Chroma Angle'} = $2; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Ordering of print statements
by Eshan_k (Acolyte) on Jun 06, 2018 at 06:03 UTC |