Search notes:

Perl variables: @_ (parameters passed to a sub)

use warnings;
use strict;

func_with_paramters('one', 2, 'three', 'IV');

sub func_with_paramters {

  print "func_with_paramters is being called with " . @_ . " parameters\n";

  print "Those parameters are:\n  ";
  
  print join "\n  ", @_;

# The default array for push, pop, shift and unshift within a sub is @_:

  my $first     = shift;
  my $second    = shift;
  my $third     = shift;
  my $fourth    = shift;

  print "\n\nshift'ed values $first   $second   $third   $fourth\n";

}
Github repository about-perl, path: /variables/@___parameters_passed_to_a_sub.pl

See also

The PowerShell array $args that is used to pass values to a PowerShell function.
Perl variables

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758200822, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/variables/at__parameters_passed_to_a_sub(63): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78