Sponsored Content
Full Discussion: Perl Exception - $!,$?,$@
Top Forums Shell Programming and Scripting Perl Exception - $!,$?,$@ Post 302229461 by otheus on Wednesday 27th of August 2008 04:16:53 AM
Old 08-27-2008
, precedence is higher than or

Code:
$ perl -e '$x->{y} or die 1,2,3;'
123 at -e line 1.

From perlop
Code:
           right       = += -= *= etc.
           left        , =>
           nonassoc    list operators (rightward)
           right       not
           left        and
           left        or xor


Last edited by otheus; 08-27-2008 at 05:17 AM.. Reason: changed "quote" to "code" markup
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

exception handling

Does exception handling exist in any UNIX enviornment? I develop on Windows MSVC++ land and need to port to UNIX. (1 Reply)
Discussion started by: RichardS
1 Replies

2. UNIX for Advanced & Expert Users

RPC Exception - Help

Hi, I am trying to use swremove to remove some old software packages before an upgrade. I keep getting the same error below. I have restarted swagent, i have killed the swagent process and started it, and I have restarted the entire system. I have now run out of ideas. Anyone know what the problem... (0 Replies)
Discussion started by: ejbrever
0 Replies

3. HP-UX

Help with RPC Exception

Hi, I am trying to use swremove to remove some old software packages before an upgrade. I keep getting the same error below. I have restarted swagent, i have killed the swagent process and started it, and I have restarted the entire system. I have now run out of ideas. Anyone know what the problem... (2 Replies)
Discussion started by: ejbrever
2 Replies

4. UNIX for Dummies Questions & Answers

How to catch the exception

Dear friends, I am transferring some files to a windows system from Unix m/c thru FTP Script given below. echo "open $host quote USER $userid quote PASS $pwd $verbose $type cd $dir bin put $file close quit"|$ftp... (0 Replies)
Discussion started by: Vijayakumarpc
0 Replies

5. Linux

MMU exception

I hope to post in the right forum, otherwise I apologize for this. if a MMU exception is caused by a process which tries to access to other memory segment (out of its own address space) what the kernel does in this case ? maybe kernel kills the "bad" process ? (2 Replies)
Discussion started by: Puntino
2 Replies

6. Shell Programming and Scripting

Exception handling

Sometimes when I try to use curl to upload to an ftp server, I get the message: $curl -T file.wmv ftp.eu.filesonic.com --user user:password curl: (8) Got a 421 ftp-server response when 220 was expected How do I get the script to try again if I get the message curl: (8)? (2 Replies)
Discussion started by: locoroco
2 Replies

7. Programming

Exception Handling C++

Hello All, I have a question ....which I am totally confused about! If I have a fxn foo in a program which returns a logical value. But it has a posssiblity to throw some exception. Now my exception handler returns a value as a string stating why the exception occured. But my... (1 Reply)
Discussion started by: mind@work
1 Replies

8. Solaris

solaris 7 exception

Hi all, An application works well under 2.6 but under 7 it gives TEXT_IO exceptions. (Is_Open, Check_Is_Open, Get_Line procedures). Any idea? Regards (3 Replies)
Discussion started by: endoavour
3 Replies

9. Shell Programming and Scripting

Re: exception using AWK

I have following file: NAME=ora.DG1.svc TYPE=ora.service.type CARDINALITY_ID=1 TARGET=ONLINE STATE=ONLINE NAME=ora.orlene.DG2.svc TYPE=ora.service.type CARDINALITY_ID=1 TARGET=ONLINE STATE=OFFLINE NAME=ora.MN.acfs TYPE=ora.registry.acfs.type TARGET=ONLINE (4 Replies)
Discussion started by: rcc50886
4 Replies

10. Shell Programming and Scripting

Monitor logs for exception and if exception come then sent an email

Hi Folks, please advise , I have logs generated on unix machine at location /ops/opt/aaa/bvg.log , now sometimes there come exception in these logs also, so I want to write such a script such that it should continuously monitor these logs and whenever any exception comes that is it try to find... (3 Replies)
Discussion started by: tuntun27272727
3 Replies
Devel::REPL::Profile(3pm)				User Contributed Perl Documentation				 Devel::REPL::Profile(3pm)

NAME
Devel::REPL::Profile - code to execute when re.pl starts SYNOPSIS
package Devel::REPL::Profile::MyProject; use Moose; use namespace::clean -except => [ 'meta' ]; with 'Devel::REPL::Profile'; sub apply_profile { my ($self, $repl) = @_; # do something here } 1; DESCRIPTION
For particular projects you might well end up running the same commands each time the REPL shell starts up - loading Perl modules, setting configuration, and so on. A mechanism called profiles exists to let you package and distribute these start-up scripts, as Perl modules. USAGE
Quite simply, follow the "SYNOPSIS" section above to create a boilerplate profile module. Within the "apply_profile" method, the $repl variable can be used to run any commands as the user would, within the context of their running "Devel::REPL" shell instance. For example, to load a module, you might have something like this: sub apply_profile { my ($self, $repl) = @_; $repl->eval('use Carp'); } As you can see, the "eval" method is used to run any code. The user won't see any output from that, and the code can "safely" die without destroying the REPL shell. The return value of "eval" will be the return value of the code you gave, or else if it died then a "Devel::REPL::Error" object is returned. If you want to load a "Devel::REPL" plugin, then use the following method: $repl->load_plugin('Timing'); The "load_plugin" and "eval" methods should cover most of what you would want to do before the user has access to the shell. Remember that plugin features are immediately available, so you can load for example the "LexEnv" plugin, and then declare "my" variables which the user will have access to. Selecting a Profile To run the shell with a particular profile, use the following command: system$ re.pl --profile MyProject Alternatively, you can set the environment variable "DEVEL_REPL_PROFILE" to MyProject. When the profile name is unqualified, as in the above example, the profile is assumed to be in the "Devel::REPL::Profile::" namespace. Otherwise if you pass something which contains the "::" character sequence, it will be loaded as-is. AUTHOR
Matt S Trout - mst (at) shadowcatsystems.co.uk (<http://www.shadowcatsystems.co.uk/>) LICENSE
This library is free software under the same terms as perl itself perl v5.14.2 2012-06-02 Devel::REPL::Profile(3pm)
All times are GMT -4. The time now is 03:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy