Or you might just want to use typeglob for only sub-routine. *real_long_fund = \& really_long_function_name_i_do_not_like_to_type;
On 8/27/08 3:02 PM, "John W. Krahn" <[EMAIL PROTECTED]> wrote: > Ryan wrote: >> given: >> >> sub really_long_function_name_i_do_not_like_to_type {return 'data';} >> >> can I create some kind of alias, like real_long_func ? >> >> how? > > Using a typeglob copy: > > $ perl -le' > sub really_long_function_name_i_do_not_like_to_type { return q/data/ } > print really_long_function_name_i_do_not_like_to_type(); > *real_long_func = *really_long_function_name_i_do_not_like_to_type; > print real_long_func(); > ' > data > data > > > Or use goto: > > $ perl -le' > sub really_long_function_name_i_do_not_like_to_type { return q/data/ } > print really_long_function_name_i_do_not_like_to_type(); > sub real_long_func { goto &really_long_function_name_i_do_not_like_to_type } > print real_long_func(); > ' > data > data > > > > John