Filter::CommaEquals

Adds support for ,= to any package or script
Download

Filter::CommaEquals Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Gryphon Shafer
  • Publisher web site:

Filter::CommaEquals Tags


Filter::CommaEquals Description

Adds support for ,= to any package or script Filter::CommaEquals is a Perl module that adds support for ,= to any package or script. Perl has +=, -=, /=, *=, .=, and so forth to operate on scalars, but it doesn't have ,= to operate on arrays. This module effectively lets you rewrite push statements with ,= instead.For example... push @array, $element; push(@array, $element_1, $element_2, $element_3); push @array, ;...can now be rewritten as... use Filter::CommaEquals; @array ,= $element; @array ,= $element_1, $element_2, $element_3; @array ,= ;Cool, huh? Admit it. You want to write ,= instead of push, don't you. You can save typing 3 whole characters!Filter::CommaEquals is scoped to the package or script that it's used in, but nothing more, and it requires Perl version 5.7.1 or higher.SYNOPSIS use Filter::CommaEquals; my @array = (42, 1138, 96); @array ,= 433; # exactly the same as writing: push(@array, 433); print join(', ', @array), " "; # prints: 42, 1138, 96, 433 Requirements: · Perl


Filter::CommaEquals Related Software