LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-09-2012, 05:25 AM   #1
umesh_linuxq
LQ Newbie
 
Registered: Jun 2009
Posts: 8

Rep: Reputation: 0
Command actions


Hi

Anybody please tell me what does this command do , command -> shift // "".

Thanks
Umesh.K
 
Old 04-09-2012, 06:03 AM   #2
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253
Blog Entries: 1

Rep: Reputation: 21
What are you exactly doing umesh.Can you please put in more information?
 
Old 04-10-2012, 12:07 AM   #3
umesh_linuxq
LQ Newbie
 
Registered: Jun 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Hi

Here i am trying to understand the Perl code which reads from Oracle spreadsheet. There are so many files in conjunction which achieves the interfacing from Perl to Oracle spreadsheet. This is some portion of the code in one particular file called 'Common.pm'. I have mentioned one of the function in this file.


sub debug
{
my $param = shift // "";
$param = shift if $param eq lpod;
given ($param)
{
when (undef) {}
when (TRUE || FALSE) { $DEBUG = $_; }
default { alert "Wrong argument"; }
}
return $DEBUG;
}

Thanks
Umesh.K
 
Old 04-10-2012, 02:51 AM   #4
yoK0
LQ Newbie
 
Registered: Apr 2012
Distribution: Slackware, CentOS
Posts: 29

Rep: Reputation: 0
Not sure what shift does in perl but in bash it lets you for example
loop through the command line arguments.
 
Old 04-11-2012, 04:26 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
see the pages of shift and split, it looks like a mixed syntax.


the real solution can be found here: Defined-Or

so
Code:
shift // ""
will return the result of shift if shift was successful, otherwise return "".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Actions for KLaptop ruh31 Linux - Laptop and Netbook 5 02-17-2006 03:40 AM
clam av actions branden_burger Linux - Security 1 07-31-2005 02:58 PM
Timed actions LongName Programming 2 09-02-2004 03:42 AM
rollback actions DriveMeCrazy AIX 6 05-16-2004 05:16 AM
how to do the following actions santasballz Linux - Newbie 8 02-20-2004 01:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration