Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about arrayref

Read more about arrayref

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - arrayref

Appropriate way to return an arrayref from a sub with optional sorting in Perl version 5.20

I try to write a subroutine under Perl 5 version 5.20, that creates a large directory list stored in an array. The subroutine returns the result as an arrayref. For convenience reasons I want the have...
test-img

huckfinn

sorting

perl

subroutine

arrayref

Votes: 0

Answers: 1

Latest Answer

If you insist on sorting out the sorting business in the return statement itself can use a ternary return $sort ? [ sort @res ] : \@res; This may be all well and clear enough in simple cases. However...
test-img

zdim

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved